Index
-
\com\setasign\SetaFramework
-
Helper
- ArrayHelper
- ConsoleHelper
- CspHelper
- CsrfProtection
- CsrfProtectionException
- DataWrapper
- DatabaseCleaner
- Debugging
- FilesystemHelper
- FunctionWrapper
- HtmlHelper
- JsonHelper
- Logger
- LoggerHelper
- MathHelper
- ObserverClosure
- OutputBufferHelper
- ParameterSanitizer
- PregMatchAllMatchesIterator
- RateLimiter
- ReturnValueClosure
- StringHelper
- SwiftMailerHelper
- UnexpectedOutputException
- UnserializableClosure
- UriSignature
-
Helper
com\setasign\SetaFramework\Helper
FilesystemHelper Class FilesystemHelper
File: /SetaFramework/src/Helper/FilesystemHelper.php
Class hierarchy
Summary
Static Methods
- chmod()
- cleanupPath()
- createDataUrl()
- createResponseByFile()
- dirIsEmpty()
- encodeFilenameForHttpHeader()
- getMaxFileUploadSize()
- getReadableFileSize()
- getReadableMaxFileUploadSize()
- md5Files()
- mkdir()
- parseSize()
- readDirectoryRecursive()
- readDirectoryRecursiveAsGenerator()
- recursiveGlob()
- recursiveGlobAsGenerator()
- unlinkRecursive()
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()
\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()
int $permission = 509,
bool $recursive = true
Create a directory. This method ignores the umask!
Parameters
- $dirName: string
- $permission: int
- $recursive: bool
Exceptions
readDirectoryRecursive()
bool $includeFiles = true,
bool $includeDirectories = true
Reads the directory recursivly.
Note: The file order may differ on different OS.
Parameters
- $dir: string
- $includeFiles: bool
- $includeDirectories: bool
readDirectoryRecursiveAsGenerator()
bool $includeFiles = true,
bool $includeDirectories = true
Reads the directory recursivly.
Note: The file order may differ on different OS.
Parameters
- $dir: string
- $includeFiles: bool
- $includeDirectories: bool
recursiveGlob()
WARNING: This method is marked as deprecated!
Use readDirectoryRecursive() instead. This method ignores
Parameters
- $pattern: string
- $flags: int
recursiveGlobAsGenerator()
WARNING: This method is marked as deprecated!
Use readDirectoryRecursiveAsGenerator() instead.
int $flags = 0
Parameters
- $pattern: string
- $flags: int
unlinkRecursive()
bool $includeDirectory = false
Removes the content from the directory.
Parameters
- $dir: string
- $includeDirectory: bool
