2 /** @package verysimple::IO */
5 * Provides helper functions for dealing with a file
7 * @package verysimple::IO
9 * @copyright 1997-2007 VerySimple, Inc.
10 * @license http://www.gnu.org/licenses/lgpl.html LGPL
23 * Creates a new instance of a FileHelper object
27 * full path to the file
29 function __construct($path)
31 // TODO: user build-in php functions to extract these properties
32 $this->Path
= str_replace("\\", "/", $path); // normalize any directory paths
34 $this->Name
= substr($this->Path
, strrpos($this->Path
, "/") +
1);
35 $this->Extention
= substr($this->Path
, strrpos($this->Path
, ".") +
1);
36 $this->Prefix
= substr($this->Name
, 0, strpos($this->Name
, "."));
37 $this->MiddleBit
= substr($this->Name
, strpos($this->Name
, ".") +
1, strrpos($this->Name
, ".") - strpos($this->Name
, ".") - 1);
38 $this->FolderPath
= substr($this->Path
, 0, strrpos($this->Path
, "/") +
1);