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