Lines Matching defs:path
18 protected $path = '';
32 * @param string $path The path of the file, can also be set later through setPath()
34 public function __construct($path = '')
37 $this->setPath($path);
61 * @param string $path path to a file on the local file system
62 * @param string $as optional path to use inside the archive
66 public static function fromPath($path, $as = '')
68 clearstatcache(false, $path);
70 if (!file_exists($path)) {
71 throw new FileInfoException("$path does not exist");
74 $stat = stat($path);
77 $file->setPath($path);
78 $file->setIsdir(is_dir($path));
79 $file->setMode(fileperms($path));
80 $file->setOwner(fileowner($path));
81 $file->setGroup(filegroup($path));
82 $file->setSize(filesize($path));
264 return $this->path;
268 * @param string $path
270 public function setPath($path)
272 $this->path = $this->cleanPath($path);
276 * Cleans up a path and removes relative parts, also strips leading slashes
278 * @param string $path
281 protected function cleanPath($path)
283 $path = str_replace('\\', '/', $path);
284 $path = explode('/', $path);
286 foreach ($path as $p) {
300 * Strip given prefix or number of path segments from the filename
302 * The $strip parameter allows you to strip a certain number of path components from the filenames
315 // if $strip is an integer we strip this many path components