PHP Classes

File: manuscript/Working with Pimf_Util_File.md

Recommend this page to a friend!
  Classes of Gjero Krsteski   PIMF   manuscript/Working with Pimf_Util_File.md   Download  
File: manuscript/Working with Pimf_Util_File.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PIMF
Framework for Web application development
Author: By
Last change: Update of manuscript/Working with Pimf_Util_File.md
Date: 5 months ago
Size: 645 bytes
 

Contents

Class file image Download

File

Gives a methods to act in a secure way with a file/s in the file system and uses SplFileInfo a high-level object oriented interface to information for an individual file.

Create a file instance.

  $file = new \Pimf\Util\File('/path/to/your/file.jpg');

Gives you the extension of the file.

  $file->getExtension();

Moves the file to a new location.

  $file->move('/path/to/destination/');

Other helpful methods that are delivered by SplFileInfo like information for an individual file, please find at php.net/manual/en/class.splfileinfo.php page.