PHP Class PunkAve\FileUploaderBundle\Services\FileManager

显示文件 Open project: punkave/symfony2-file-uploader-bundle

Protected Properties

Property Type Description
$options

Public Methods

Method Description
__construct ( $options )
getFiles ( $options = [] ) Get a list of files already present. The 'folder' option is required.
removeFiles ( $options = [] ) Remove the folder specified by 'folder' and its contents.
syncFiles ( $options = [] ) Sync existing files from one folder to another. The 'fromFolder' and 'toFolder' options are required. As with the 'folder' option elsewhere, these are appended to the file_base_path for you, missing parent folders are created, etc. If 'fromFolder' does not exist no error is reported as this is common if no files have been uploaded. If there are files and the sync reports errors an exception is thrown.

Method Details

__construct() public method

public __construct ( $options )

getFiles() public method

If you pass consistent options to this method and handleFileUpload with regard to paths, then you will get consistent results.
public getFiles ( $options = [] )

removeFiles() public method

If you pass consistent options to this method and handleFileUpload with regard to paths, then you will get consistent results.
public removeFiles ( $options = [] )

syncFiles() public method

If you pass consistent options to this method and handleFileUpload with regard to paths, then you will get consistent results.
public syncFiles ( $options = [] )

Property Details

$options protected_oe property

protected $options