API Documentation

Filesystem
in package
uses ForwardsIlluminateFilesystem

Proxies the Laravel File facade with extra features and helpers tailored for HydePHP.

For maximum compatability and interoperability, all path references in HydePHP are relative to the root of the project. The helpers here will then prepend the project root to the path before actually interacting with the filesystem.

Tags
see
Filesystem
see
Filesystem

Table of Contents

Methods

__callStatic()  : string|array<string|int, mixed>|int|bool|null|LazyCollection
absolutePath()  : string
Format the given project path to be absolute. Already absolute paths are normalized.
basePath()  : string
Get the base path of the HydePHP project.
getContents()  : string
Get the contents of a file.
putContents()  : int|bool
Write the contents of a file.
relativePath()  : string
Remove the absolute path from the given project path so that it becomes relative.
smartGlob()  : Collection<int, string>
A smarter glob function that will run the specified glob pattern a bit more intelligently.
touch()  : bool
Touch one or more files in the project's directory.
unlink()  : bool
Unlink one or more files in the project's directory.
unlinkIfExists()  : bool
Unlink a file in the project's directory, but only if it exists.
filesystem()  : Filesystem
getParameterNames()  : array<string|int, mixed>
kernel()  : HydeKernel
qualifyArguments()  : Collection
qualifyPathArgument()  : string|array<string|int, mixed>

Methods

__callStatic()

public static __callStatic(string $name, array<string|int, mixed> $arguments) : string|array<string|int, mixed>|int|bool|null|LazyCollection
Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
string|array<string|int, mixed>|int|bool|null|LazyCollection

absolutePath()

Format the given project path to be absolute. Already absolute paths are normalized.

public static absolutePath(string $path) : string
Parameters
$path : string
Return values
string

basePath()

Get the base path of the HydePHP project.

public static basePath() : string
Return values
string

getContents()

Get the contents of a file.

public static getContents(string $path[, bool $lock = false ]) : string
Parameters
$path : string
$lock : bool = false
Tags
throws
FileNotFoundException
Return values
string

putContents()

Write the contents of a file.

public static putContents(string $path, string $contents[, bool $lock = false ]) : int|bool
Parameters
$path : string
$contents : string
$lock : bool = false
Return values
int|bool

relativePath()

Remove the absolute path from the given project path so that it becomes relative.

public static relativePath(string $path) : string
Parameters
$path : string
Return values
string

smartGlob()

A smarter glob function that will run the specified glob pattern a bit more intelligently.

public static smartGlob(string $pattern[, int $flags = 0 ]) : Collection<int, string>

While this method will use the absolute path when interacting with the filesystem, the returned collection will only contain relative paths.

Parameters
$pattern : string
$flags : int = 0
Return values
Collection<int, string>

touch()

Touch one or more files in the project's directory.

public static touch(string|array<string|int, mixed> $path) : bool
Parameters
$path : string|array<string|int, mixed>
Return values
bool

Unlink one or more files in the project's directory.

public static unlink(string|array<string|int, mixed> $path) : bool
Parameters
$path : string|array<string|int, mixed>
Return values
bool

unlinkIfExists()

Unlink a file in the project's directory, but only if it exists.

public static unlinkIfExists(string $path) : bool
Parameters
$path : string
Return values
bool

True if the file was unlinked, false if it did not exist or failed to unlink.

filesystem()

protected static filesystem() : Filesystem
Return values
Filesystem

getParameterNames()

protected static getParameterNames(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

qualifyArguments()

protected static qualifyArguments(array<string|int, string> $parameterNames, array<string|int, mixed> $arguments) : Collection
Parameters
$parameterNames : array<string|int, string>
$arguments : array<string|int, mixed>
Return values
Collection

qualifyPathArgument()

protected static qualifyPathArgument(array<string|int, mixed>|string $path) : string|array<string|int, mixed>
Parameters
$path : array<string|int, mixed>|string
Return values
string|array<string|int, mixed>

        
On this page

Search results