示例#1
0
文件: Dir.php 项目: mbcraft/piol
 /**
  * 
  * Construct a directory instance, using a path relative to PIOL_ROOT_PATH.
  * 
  * @param string $path the path of this directory, relative to PIOL_ROOT_PATH as a root.
  * 
  * @api
  */
 public function __construct($path)
 {
     if ($path == "") {
         $path = DS;
     }
     //replace \ with /
     $new_path = str_replace("\\", DS, $path);
     if (substr($new_path, strlen($new_path) - 1, 1) != DS) {
         $new_path = $new_path . DS;
     }
     parent::__construct($new_path);
 }
示例#2
0
文件: File.php 项目: mbcraft/piol
 /**
  *
  * Construct a \Mbcraft\Piol\File instance.
  *
  * @param string $path The path of the file.
  *
  * @api
  */
 public function __construct($path)
 {
     parent::__construct($path);
 }
示例#3
0
 function __construct($path)
 {
     $new_path = str_replace("\\", DS, $path);
     parent::__construct($new_path);
 }