Salva um diretório com todos os arquivos PHP ofuscados
no caminho especificado.

@param  string $path
@return bool
490272
public function saveDirectory(string $path) : bool
    {
        $this->obfuscated_path = rtrim($path, "/");
        if(is_dir($this->obfuscated_path) === false) {
            $this->addErrorMessage("The specified directory does not exist");
            return false;
        }

        if (is_writable($this->obfuscated_path) == false) {
            $this->addErrorMessage("No permissions to write to the directory");
            return false;
        }

        if ($this->obfuscateDirectoryDeep($this->plain_path, $this->obfuscated_path) == true ) {
            // Diretório ofuscado com sucesso,
            // gera o autoloader
            return $this->setupAutoloader();
        }

        return false;
    }
1247677
public function has($path) {
        $target = &$this->all;
        foreach (explode('.', $path) as $key) {
            if (array_key_exists($key, $target)) {
                $target = &$target[$key];
            } else return false;
        }
        return true;
    }
1240093
public static function mkdir($path): bool
    {
        if (is_dir($path)) {
            return true;
        }

        if (dirname($path) && !is_dir(dirname($path))) {
            self::mkdir(dirname($path));
        }

        try {
            mkdir($path);

            return true;
        } catch (Throwable $ex) {
            return false;
        }
    }
1352613
public function delete($path)
    {
        $location = $this->applyPathPrefix($path);

        try {
            $this->share->del($location);
        } catch (NotFoundException $e) {
            return false;
        } catch (InvalidTypeException $e) {
            return false;
        }

        return true;
    }
219107
protected function doUnlink(string $path): bool
    {
        if (self::$root->getName() === $path) {
            // delete root? very brave. :)
            self::$root = null;
            clearstatcache();
            return true;
        }

        $names = $this->splitPath($path);

        /** @var vfsStreamDirectory $content */
        $content = $this->getContent($names['dirname']);
        if (!$content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
            return false;
        }

        clearstatcache();
        return $content->removeChild($names['basename']);
    }
226521
public static function isDotPath($path = null)
    {
        if (is_null($path) || empty($path)) {
            return false;
        }
        return (bool) ('.'===substr(basename($path), 0, 1));
    }
1050780
protected function verifyPath($path){
		if (file_exists($path)) return true;
			
		if (mkdir($path, 0777, true)) return true;
				
		return false;
	}
14582
public static function isDir($path)
    {
        return (self::isPhar($path) === true) ? file_exists($path) : is_dir($path);
    }
742536
public static function deleteDirRecursively($path)
    {
        if (! $paths = self::getFilesFromDir($path)) {
            return false;
        }

        foreach ($paths as $file) {
            if ($file->isFile()) {
                if (! self::delete($file->getRealPath())) {
                    return false;
                }
            } elseif (! $file->isDot() && $file->isDir()) {
                self::deleteDirRecursively($file->getRealPath());
                self::deleteEmptyDir($file->getRealPath());
            }
        }

        return self::deleteEmptyDir($path);
    }
216653
public function isFile($path)
    {
        $metadata = $this->dropbox->getMetadata($this->pathRoot.$path);
        return is_array($metadata) && isset($metadata['is_dir']) && $metadata['is_dir']==false;
    }
564458
public function has(string $path): bool
    {
        $keys = $this->explode($path);
        $array = $this->items;
        foreach ($keys as $key) {
            if (!array_key_exists($key, $array)) {
                return false;
            }
            $array = $array[$key];
        }
        return true;
    }
746300
public function checkFilter($path)
    {
        //No filters? Include all paths.
        if (empty($this->filters)) {
            return true;
        }

        //Match either with or without braces.
        $cleanPath = str_replace(array('{', '}'), array('', ''), $path);
        foreach ($this->filters as $filter) {
            if (stripos($path, $filter) !== false || stripos($cleanPath, $filter) !== false) {
                return true;
            }
        }
        return false;
    }
60244
private static function isValidUriPath(string $path): bool
    {
        // http://tools.ietf.org/html/rfc3986#section-3
        // The scheme and path components are required, though the path may be
        // empty (no characters)
        if ($path === '') {
            return true;
        }

        // path          = path-abempty    ; begins with "/" or is empty
        //               / path-absolute   ; begins with "/" but not "//"
        //               / path-noscheme   ; begins with a non-colon segment
        //               / path-rootless   ; begins with a segment
        //               / path-empty      ; zero characters
        //
        // path-abempty  = *( "/" segment )
        // path-absolute = "/" [ segment-nz *( "/" segment ) ]
        // path-noscheme = segment-nz-nc *( "/" segment )
        // path-rootless = segment-nz *( "/" segment )
        // path-empty    = 0<pchar>
        // segment       = *pchar
        // segment-nz    = 1*pchar
        // segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
        //               ; non-zero-length segment without any colon ":"
        // pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
        $pattern = sprintf(
            '/\A(?:(?:[%s%s:@]|(?:%s))*\/?)*\z/i',
            'a-z0-9\-._~',
            '!$&\'()*+,;=',
            '%[a-f0-9]{2}'
        );

        return !!preg_match($pattern, $path);
    }
365293
public function isdir( $path )
	{
		return in_array( basename( $path ), $this->fs->directories( dirname( $path ) ) );
	}
471543
private function checkPathPatterns($path)
    {
        foreach ($this->pathPatterns as $pattern) {
            if (preg_match('/^' . $pattern . '$/D', $path)) {
                return true;
            }
        }

        return false;
    }
646825
public static final function ppath ($path){
		while (!is_dir($path) && strlen($path) > 0){
			$path = preg_replace('/[^\/]+\/?$/', null, $path);
		}

		return !empty($path) ? $path : false;
	}
1198902
public function has(string $path)
    {
        $path = Util::normalizePath($path);

        return $path === '' ? false : (bool) $this->adapter->has($path);
    }