|
| $app |
|
| $backend |
|
| $thumbnailRepository |
|
| $resourceType |
|
| $clientCurrentFolder |
|
| $path |
|
| $aclMask |
|
| $detector |
|
| $resourceType |
|
| $path |
|
The WorkingFolder class.
Represents a working folder for the current request defined by a resource type and a relative path.
◆ containsFile()
containsFile |
( |
string |
$fileName | ) |
|
Checks if the current working folder contains a file with a given name.
- Exceptions
-
◆ createDirectory()
createDirectory |
( |
string |
$dirname | ) |
|
Creates a directory with a given name in the working folder.
- Parameters
-
string | $dirname | directory name |
- Returns
- array [string, bool] [0] Created folder name, [1]
true
if the folder was created successfully
- Exceptions
-
AlreadyExistsException | |
InvalidNameException | |
AccessDeniedException | |
FilesystemException | |
◆ delete()
Deletes the current working folder.
- Returns
- bool
true
if the deletion was successful
◆ getAclMask()
Returns ACL mask computed for the current user and the current working folder.
◆ getBackend()
Returns the backend assigned for the current resource type.
◆ getClientCurrentFolder()
getClientCurrentFolder |
( |
| ) |
|
Returns the client current folder path.
◆ getFileUrl()
getFileUrl |
( |
string |
$fileName, |
|
|
string |
$thumbnailFileName = null |
|
) |
| |
Returns the URL to a given file.
- Exceptions
-
InvalidExtensionException | |
InvalidRequestException | |
FileNotFoundException | |
FilesystemException | |
◆ getPath()
Returns the backend relative path with the resource type directory prefix.
◆ getResourceType()
Returns the ResourceType object for the current working folder.
◆ getResourceTypeName()
Returns the name of the current resource type.
◆ getSubscribedEvents()
static getSubscribedEvents |
( |
| ) |
|
|
static |
Returns listeners for the event dispatcher.
- Returns
- array subscribed events
◆ getThumbnailsRepository()
getThumbnailsRepository |
( |
| ) |
|
Returns the thumbnails repository object.
◆ listDirectories()
Lists directories in the current working folder.
- Returns
- array list of directories
◆ listFiles()
Lists files in the current working folder.
- Returns
- array list of files
◆ omitResponseInfo()
Tells the current WorkingFolder object to not add the current folder to the response.
By default the WorkingFolder object acts as an event subscriber and listens for the KernelEvents::RESPONSE
event. The response given is then modified by adding information about the current folder.
- See also
- WorkingFolder::addCurrentFolderInfo()
◆ putStream()
putStream |
( |
|
$fileName, |
|
|
|
$resource, |
|
|
|
$mimeType = null |
|
) |
| |
Creates or updates a file inside the current working folder using the stream.
- Parameters
-
string | $fileName | file name |
resource | $resource | file data stream |
string | $mimeType | file MIME type |
- Returns
- bool
true
if updated successfully
◆ read()
Returns contents of the file with a given name.
- Exceptions
-
◆ readStream()
readStream |
( |
string |
$fileName | ) |
|
Returns contents stream of the file with a given name.
- Returns
- resource
- Exceptions
-
League\Flysystem\FileNotFoundException
◆ write()
write |
( |
|
$fileName, |
|
|
|
$data |
|
) |
| |
Creates a file inside the current working folder.
- Parameters
-
string | $fileName | file name |
string | $data | file data |
- Returns
- bool
true
if created successfully
◆ writeStream()
writeStream |
( |
|
$fileName, |
|
|
|
$resource |
|
) |
| |
Creates a file inside the current working folder using the stream.
- Parameters
-
string | $fileName | file name |
resource | $resource | file data stream |
- Returns
- bool
true
if created successfully
The documentation for this class was generated from the following file: