root

Changeset 724

Show
Ignore:
Timestamp:
10/26/09 12:51:03 (9 months ago)
Author:
wbond
Message:

Fixed ticket #333 - changed fFile to allow getting the directory, filename and path on files that have been deleted

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fFile.php

    r687 r724 Hide Line Numbers
    1010 * @link       http://flourishlib.com/fFile 
    1111 *  
    12  * @version    1.0.0b25 
     12 * @version    1.0.0b26 
     13 * @changes    1.0.0b26  ::getDirectory(), ::getFilename() and ::getPath() now all work even if the file has been deleted [wb, 2009-10-22] 
    1314 * @changes    1.0.0b25  Fixed ::__construct() to throw an fValidationException when the file does not exist [wb, 2009-08-21] 
    1415 * @changes    1.0.0b24  Fixed a bug where deleting a file would prevent any future operations in the same script execution on a file or directory with the same path [wb, 2009-08-20] 
     
    745746    public function getDirectory() 
    746747    { 
    747         $this->tossIfException(); 
    748          
    749748        return new fDirectory(fFilesystem::getPathInfo($this->file, 'dirname')); 
    750749    } 
     
    758757    public function getFilename() 
    759758    { 
    760         $this->tossIfException(); 
    761          
    762759        // For some reason PHP calls the filename the basename, where filename is the filename minus the extension 
    763760        return fFilesystem::getPathInfo($this->file, 'basename'); 
     
    902899    public function getPath($translate_to_web_path=FALSE) 
    903900    { 
    904         $this->tossIfException(); 
    905          
    906901        if ($translate_to_web_path) { 
    907902            return fFilesystem::translateToWebPath($this->file);