Reset all cache.

@param string $path
@return \Transit\File
8612
public function reset($path = '') {
        clearstatcache();

        $this->_cache = array();

        if ($path) {
            $this->_data['name'] = basename($path);
            $this->_path = $path;
        }

        return $this;
    }
996967
public static function delete($path)
  {
    if (is_file($path)) {
      return unlink($path);
    }

    $files = array_diff(scandir($path), array('.', '..'));

    foreach ($files as $file) {
      (is_dir("$path/$file")) ? Filesystem::delete("$path/$file") : unlink("$path/$file");
    }

    return rmdir($path);
  }
423768
public function setCache($path, AssetInterface $asset)
    {
        $provider = $this->getProvider($path);

        if (!$provider instanceof CacheInterface) {
            return $asset;
        }

        $assetCache             = new AssetCache($asset, $provider);
        $assetCache->mimetype   = $asset->mimetype;

        return $assetCache;
    }
390482
public function resetPath(string $path)
    {
        foreach ($this->cache as &$cache) {
            unset($cache[$path], $cache);
        }
    }
790332
public static function fromFile($path)
    {
        return new self($path, filesize($path), \DateTime::createFromFormat('U', filemtime($path)));
    }
1195986
public function createAutoload($path)
	{
		$loader = new Loaders\RobotLoader;
		$loader->setCacheStorage(new Caching\Storages\FileStorage($this->temp));
		$loader->addDirectory($path)->register();
		return $loader;
	}
242279
public function deleteFile($path)
    {
        event(new Events\FileDeleting($path));
        $deleted = $this->disk()->delete($path);
        event(new Events\FileDeleted($path, $deleted));

        return $deleted;
    }
856512
public function logDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->logDir = rtrim($path, '/');

        return $this;
    }
236747
public function remove($path)
    {
        StructureHelper::removeByPath($this->data, $path, $this->separator);

        return $this;
    }
859811
public function setPath($path)
    {
        static $pathReplace = array(' ' => '%20', '?' => '%3F');
        if (is_array($path)) {
            $path = '/' . implode('/', $path);
        }

        $this->path = strtr($path, $pathReplace);

        return $this;
    }
170991
public function getDirectory($path)
    {
        $subDirectory = new self($this->getFileSystemId(), $this->getFullPath($path));
        $subDirectory->setServiceLocator($this->getServiceLocator());
        return $subDirectory;
    }
1163951
public static function getInstanceByPath($path, $cacheDir = '')
    {
        $instance = new self();

        $instance->pathFile = $path;

        if (!empty($cacheDir)) {
            $instance->setCacheDir($cacheDir);
            $instance->setCachePath();
        }

        $instance->readImage();

        return $instance;
    }
172063
protected function clear($path)
    {
        $directory = new \RecursiveDirectoryIterator($path, 4096);

        $iterator = new \RecursiveIteratorIterator($directory, 2);

        foreach ($iterator as $file) {
            $git = strpos($file->getRealPath(), '.git') !== false;

            $path = (string) $file->getRealPath();

            $git || ($file->isDir() ? rmdir($path) : unlink($path));
        }
    }
1374212
public static function delete($path)
    {
        $files = self::getContent($path);
        foreach ($files as $file) {
            if (is_dir($path.DIRECTORY_SEPARATOR.$file)) {
                self::delete($path.DIRECTORY_SEPARATOR.$file);
            } else {
                @unlink($path.DIRECTORY_SEPARATOR.$file);
            }
        }

        return @rmdir($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);
    }
395084
public function delete($path)
    {
        [$prefix, $path] = $this->getPrefixAndPath($path);

        return $this->getFilesystem($prefix)->delete($path);
    }
1203904
public function delete($path)
    {
        if ($file = $this->getFileObject($path)) {
            $name = $file->getName();
            list ($parentId, $id) = $this->splitPath($path);
            if ($parents = $file->getParents()) {
                $file = new Google_Service_Drive_DriveFile();
                $opts = [];
                $res = false;
                if (count($parents) > 1) {
                    $opts['removeParents'] = $parentId;
                } else {
                    if ($this->options['deleteAction'] === 'delete') {
                        try {
                            $this->service->files->delete($id);
                        } catch (Google_Exception $e) {
                            return false;
                        }
                        $res = true;
                    } else {
                        $file->setTrashed(true);
                    }
                }
                if (!$res) {
                    try {
                        $this->service->files->update($id, $file, $this->applyDefaultParams($opts, 'files.update'));
                    } catch (Google_Exception $e) {
                        return false;
                    }
                }
                unset($this->cacheFileObjects[$id], $this->cacheHasDirs[$id], $this->cacheFileObjectsByName[$parentId . '/' . $name]);
                return true;
            }
        }
        return false;
    }