Class: IOHelper

Source Location: /CORE/system/classes/util/IOHelper.php

Class IOHelper

Class Overview

This class provides static helper methods for Filesystem IO.

Located in /CORE/system/classes/util/IOHelper.php [line 37]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: IOHelper.php,v 1.9 2008/09/20 22:26:06 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
static void   createDirectory()   Creates a directory with the preconfigured rights.
static boolean   deleteFile()   Tries to delete the given File or Directory.
static void   getFilesFromDirectory()   Returns an Array of all Files from a given Directory with the defined File Extension.
static void   get_file_contents()  

[ Top ]
Methods
static method createDirectory  [line 107]

  static void createDirectory( $name, [ $rights = _BIGACE_DEFAULT_RIGHT_DIRECTORY], [ $mask = _BIGACE_DEFAULT_UMASK_DIRECTORY]  )

Creates a directory with the preconfigured rights.

Returns TRUE if the Directory already exists OR if the Directoty was created!

Parameters:
   $name: 
   $rights: 
   $mask: 


[ Top ]
static method deleteFile  [line 47]

  static boolean deleteFile( $filename  )

Tries to delete the given File or Directory.

Directories will be deleted recursive. If any file could not be deleted, the method stops immediately and returns false. If all files could be deleted, it returns true. You should perofrm a check for file_exists() after an delete attempt.

Parameters:
   $filename: 

API Tags:
Return:  whether all files could be deleted (recursive) or not


[ Top ]
static method getFilesFromDirectory  [line 84]

  static void getFilesFromDirectory( $directory, [ $fileExtension = ''], [ $includeDir = true]  )

Returns an Array of all Files from a given Directory with the defined File Extension.

If no File Extension is given we return all found Files. If the Last parameter is set, we return the full Filename including the Directory, otherwise we return only the File name itself.

Parameters:
   $directory: 
   $fileExtension: 
   $includeDir: 

API Tags:
Access:  public


[ Top ]
static method get_file_contents  [line 124]

  static void get_file_contents( $file  )

Parameters:
   $file: 


[ Top ]