Ejemplo n.º 1
0
	/**
	 * Creates a new object of type File.
	 *
	 * The specified path needn't exist and can be a relative or an absolute path.
	 *
	 * @param	string	Path to a file.
	 * @param	boolean	Set to false to disable ftp fallback, true to enable ftp fallback (default).
	 */
	public function __construct($path, $ftpFallback = true) {
		parent::__construct($path, $ftpFallback);
		$this->handle = null;
	}
Ejemplo n.º 2
0
	/**
	 * Creates a new object of type Folder.
	 *
	 * The folder given as parameter need not exist.
	 * The folder can be a relative or a absolute path.
	 * If you specify a file the parent folder is used.
	 *
	 * @param	string	Path to a folder.
	 */
	public function __construct($dir, $ftpFallback = true) {
		if (is_file($dir)) {
			$dir = dirname($dir);
		}
		parent::__construct($dir, $ftpFallback);
	}