CKFinder 3 – PHP Connector Documentation
WorkingFolder Class Reference
Inheritance diagram for WorkingFolder:
Folder

Public Member Functions

 getResourceType ()
 
 getResourceTypeName ()
 
 getClientCurrentFolder ()
 
 getPath ()
 
 getBackend ()
 
 getThumbnailsRepository ()
 
 listDirectories ()
 
 listFiles ()
 
 getAclMask ()
 
 createDirectory (string $dirname)
 
 write ($fileName, $data)
 
 writeStream ($fileName, $resource)
 
 putStream ($fileName, $resource, $mimeType=null)
 
 containsFile (string $fileName)
 
 read (string $fileName)
 
 readStream (string $fileName)
 
 delete ()
 
 getFileUrl (string $fileName, string $thumbnailFileName=null)
 
 getResizedImageRepository ()
 
 omitResponseInfo ()
 
- Public Member Functions inherited from Folder
 __construct (ResourceType $resourceType, $path)
 

Static Public Member Functions

static getSubscribedEvents ()
 
- Static Public Member Functions inherited from Folder
static isValidName ($folderName, $disallowUnsafeCharacters)
 

Protected Attributes

 $app
 
 $backend
 
 $thumbnailRepository
 
 $resourceType
 
 $clientCurrentFolder
 
 $path
 
 $aclMask
 
 $detector
 
- Protected Attributes inherited from Folder
 $resourceType
 
 $path
 

Detailed Description

The WorkingFolder class.

Represents a working folder for the current request defined by a resource type and a relative path.

Member Function Documentation

◆ containsFile()

containsFile ( string  $fileName)

Checks if the current working folder contains a file with a given name.

Exceptions
FilesystemException

◆ createDirectory()

createDirectory ( string  $dirname)

Creates a directory with a given name in the working folder.

Parameters
string$dirnamedirectory name
Returns
array [string, bool] [0] Created folder name, [1] true if the folder was created successfully
Exceptions
AlreadyExistsException
InvalidNameException
AccessDeniedException
FilesystemException

◆ delete()

delete ( )

Deletes the current working folder.

Returns
bool true if the deletion was successful

◆ getAclMask()

getAclMask ( )

Returns ACL mask computed for the current user and the current working folder.

◆ getBackend()

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()

getPath ( )

Returns the backend relative path with the resource type directory prefix.

◆ getResourceType()

getResourceType ( )

Returns the ResourceType object for the current working folder.

◆ getResourceTypeName()

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()

listDirectories ( )

Lists directories in the current working folder.

Returns
array list of directories

◆ listFiles()

listFiles ( )

Lists files in the current working folder.

Returns
array list of files

◆ omitResponseInfo()

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$fileNamefile name
resource$resourcefile data stream
string$mimeTypefile MIME type
Returns
bool true if updated successfully

◆ read()

read ( string  $fileName)

Returns contents of the file with a given name.

Exceptions
FilesystemException

◆ readStream()

readStream ( string  $fileName)

Returns contents stream of the file with a given name.

Returns
resource
Exceptions
FilesystemException

League\Flysystem\FileNotFoundException

◆ write()

write (   $fileName,
  $data 
)

Creates a file inside the current working folder.

Parameters
string$fileNamefile name
string$datafile data
Returns
bool true if created successfully

◆ writeStream()

writeStream (   $fileName,
  $resource 
)

Creates a file inside the current working folder using the stream.

Parameters
string$fileNamefile name
resource$resourcefile data stream
Returns
bool true if created successfully

The documentation for this class was generated from the following file: