wbond / flourish (http://flourishlib.com/)
Flourish is a PHP unframework — a general-purpose, object-oriented library. It's architecture is modular and thus not strictly MVC. It focuses on being secure, broadly compatible, portable, well documented and easy to use.
| commit 723: | b4aa9e574048 |
| parent 722: | 6268ca3633a4 |
| branch: | trunk |
[svn r724] Fixed ticket #333 - changed fFile to allow getting the directory, filename and path on files that have been deleted
Changed (Δ46 bytes):
raw changeset »
classes/fFile.php (2 lines added, 7 lines removed)
Up to file-list classes/fFile.php:
9 |
9 |
* @package Flourish |
10 |
10 |
* @link http://flourishlib.com/fFile |
11 |
11 |
* |
12 |
* @version 1.0.0b2 |
|
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] |
|
13 |
14 |
* @changes 1.0.0b25 Fixed ::__construct() to throw an fValidationException when the file does not exist [wb, 2009-08-21] |
14 |
15 |
* @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] |
15 |
16 |
* @changes 1.0.0b23 Added the ability to skip checks in ::__construct() for better performance in conjunction with fFilesystem::createObject() [wb, 2009-08-06] |
| … | … | @@ -744,8 +745,6 @@ class fFile implements Iterator |
744 |
745 |
*/ |
745 |
746 |
public function getDirectory() |
746 |
747 |
{ |
747 |
$this->tossIfException(); |
|
748 |
||
749 |
748 |
return new fDirectory(fFilesystem::getPathInfo($this->file, 'dirname')); |
750 |
749 |
} |
751 |
750 |
|
| … | … | @@ -757,8 +756,6 @@ class fFile implements Iterator |
757 |
756 |
*/ |
758 |
757 |
public function getFilename() |
759 |
758 |
{ |
760 |
$this->tossIfException(); |
|
761 |
||
762 |
759 |
// For some reason PHP calls the filename the basename, where filename is the filename minus the extension |
763 |
760 |
return fFilesystem::getPathInfo($this->file, 'basename'); |
764 |
761 |
} |
| … | … | @@ -901,8 +898,6 @@ class fFile implements Iterator |
901 |
898 |
*/ |
902 |
899 |
public function getPath($translate_to_web_path=FALSE) |
903 |
900 |
{ |
904 |
$this->tossIfException(); |
|
905 |
||
906 |
901 |
if ($translate_to_web_path) { |
907 |
902 |
return fFilesystem::translateToWebPath($this->file); |
908 |
903 |
} |
