Please find an alternative implementation for accessing files and folders in chapter FileSystem. It provides an object-oriented API as well as more functionality.

The FilesystemManager provides methods for file and folder handling. This includes static methods for deleting, copying, or moving files and creation and deletion of folders.

The class provides the following methods:

  • deleteFolder(): Deletes a folder. If the second param is set to true, the folder is deleted recursively.
  • createFolder(): Creates a folder in recursive style. The second param can be used to indicate the umask.
  • copyFile(): Copies a file.
  • removeFile(): Deletes a file.
  • uploadFile(): Handles a file uploaded via HTTP.
  • renameFile(): Renames a file.
  • getFolderContent(): Returns a list of files/folders within a folder.
  • getFileAttributes(): Returns an associative array of file attributes.
  • getFolderSize(): Returns the size of a folder.

Details on the params and return values can be seen in the API documentation of the desired release under Downloads.


Do you want to add a comment to the article above, or do you want to post additional hints? So please click here. Comments already posted can be found below.
There are no comments belonging to this article.

In order to provide a state-of-the-art web experience and to continuously improve our services we are using cookies. By using this web page you agree to the use of cookies. For more information, please refer to our Privacy policy.