Index
-
\com\setasign\SetaFramework
-
Helper
- ArrayHelper
- ConsoleHelper
- CsrfProtection
- CsrfProtectionException
- DataWrapper
- DatabaseCleaner
- Debugging
- FilesystemHelper
- FunctionWrapper
- JsonHelper
- Logger
- LoggerHelper
- MathHelper
- ObserverClosure
- OutputBufferHelper
- ParameterSanitizer
- PregMatchAllMatchesIterator
- RateLimiter
- ReturnValueClosure
- StringHelper
- SwiftMailerHelper
- UnexpectedOutputException
- UnserializableClosure
-
Helper
com\setasign\SetaFramework\Helper
FilesystemHelper Class FilesystemHelper
File: /SetaFramework/src/Helper/FilesystemHelper.php
Class hierarchy
Summary
Static Methods
chmod()
Change file permission. This method ignores the umask!
Parameters
- $filename : string
- $permissions : int
Exceptions
cleanupPath()
Resolves '..' in paths without relying on the existance of the path like realpath(). This method will not remove ".." at the beginning of the string.
DIRECTORY_SEPARATOR at the end of the string will be replaced
The input path and the output path should technically be the same.
Parameters
- $path : string
createDataUrl()
Parameters
createResponseByFile()
public static FilesystemHelper::createResponseByFile (
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory,
\com\setasign\SetaFramework\FileSystem\File $file,
bool $inline = true,
array $headers = array ( )
): \Psr\Http\Message\ResponseInterface\com\setasign\SetaFramework\FileSystem\File $file,
bool $inline = true,
array $headers = array ( )
Creates a response by a file
Parameters
- $httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
- $file : \com\setasign\SetaFramework\FileSystem\File
- $inline : bool
If true then the content-disposition is set to inline otherwise to attachment
- $headers : array
Additional HttpHeaders Content-Type, Content-Length and Content-Disposition cannot be used
Exceptions
mkdir()
Create a directory. This method ignores the umask!
Parameters
- $dirName : string
- $permission : int
Exceptions
recursiveGlobAsGenerator()
public static FilesystemHelper::recursiveGlobAsGenerator (
string $pattern,
int $flags = 0
): \Generatorint $flags = 0
Parameters
- $pattern : string
- $flags : int
unlinkRecursive()
Removes the content from the directory.
The directory itself will not be unlinked.
Parameters
- $dir : string
