io
Packages
Interfaces
Classes
Files

Class: FileSystemElement

Source Location: /io/filesystem/file_system_element.class.php [line 38]

Class Overview


This class represents any file system element.

Author(s):



Class Details

This class represents any file system element.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor FileSystemElement [line 44]

FileSystemElement FileSystemElement( string $path)
Builds a FileSystemElement object from the path of the element.

Parameters:

string   $path   Path of the element
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method change_chmod [line 123]

void change_chmod( int $chmod)
Changes the chmod of the element.

Parameters:

int   $chmod   The new chmod of the file. Put a 0 at the begening of the number to indicate to the PHP parser that it's an octal value.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method delete [line 135]

void delete( )
Deletes the element

Tags:

  • abstract:

Overridden in child classes as:

Folder::delete()
Deletes the folder and all what it contains.
File::delete()
Deletes the file.

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method exists [line 54]

bool exists( )
Allows you to know if the file system element exists.

Tags:

  • return: True if the file exists, else, false.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get [line 75]

void get( )
Initializes the file system element just before to be read.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_name [line 100]

string get_name( [bool $full_path = false], [bool $no_extension = false])
Returns the element name.

Tags:

  • return: The element name.

Parameters:

bool   $full_path   True if you want the full path or false if you just want a relative path.
bool   $no_extension   False if you want the name of the file with the extension and true without.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method open [line 62]

void open( )
Opens the file system element.

Overridden in child classes as:

Folder::open()
Opens the folder.
File::open()
Opens the file. You cannot read or write a closed file, use this method to open it.

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method write [line 88]

unknown_type write( )
Does the necessary treatment to apply at each writing operation

Tags:

  • abstract:

Overridden in child classes as:

File::write()
Writes some text in the file.

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 146]   bool  $is_open 

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    [line 141]   string  $path 

    Tags:

      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
      Documentation generated on Tue, 28 Jul 2009 22:43:37 +0200 by phpDocumentor 1.4.1