Gets a Filesystem instance.

@return instance Filesystem
551899
public function filesystem(string $path = null)
    {
        if (!$this->filesystem instanceof Filesystem) {
            $local = new Local($path);

            $this->filesystem = new Filesystem($local);
        }

        return $this->filesystem;
    }
694401
@Override
  public CloudStorageFileSystem getFileSystem(URI uri) {
    initStorage();
    return newFileSystem(uri, Collections.<String, Object>emptyMap());
  }
806257
public static function getInstance()
    {
        if (!isset(self::$_instance)) {
            $c = __CLASS__;
            self::$_instance = new $c;
        }
        return self::$_instance;
    }
1312630
public function createCache() {

		if($this->hasCache(TRUE)) {
			return $this->path.self::CACHE_PATH . DIRECTORY_SEPARATOR;
		}

		if(!@mkdir($this->path.self::CACHE_PATH)) {
			throw new FilesystemFolderException(sprintf('Cache folder %s could not be created!', $this->path . self::CACHE_PATH));
		}
		else {
			chmod($this->path.self::CACHE_PATH, 0777);
			return $this->path.self::CACHE_PATH . DIRECTORY_SEPARATOR;
		}

	}
301120
protected function getFileStorage()
    {
        if (!$this->storageService) {
            $this->storageService = $this->getServiceManager()->get(\tao_models_classes_service_FileStorage::SERVICE_ID);
        }
        return $this->storageService;
    }
671513
protected static function getFacadeAccessor()
    {
    	$viewPath = dirname(dirname(dirname(__DIR__)));
        $adapter = new Local($viewPath);
        $filesystem = new Filesystem($adapter);
        return $filesystem;
    }
971406
protected static String getInstancesFolder(FileSystem fS, Configuration conf) throws IOException {
    return conf.get(HDFS_TMP_FOLDER_CONF, fS.equals(FileSystem.getLocal(conf)) ? DEFAULT_LOCAL_TMP_FOLDER_CONF_VALUE
        : DEFAULT_HDFS_TMP_FOLDER_CONF_VALUE);
  }
514307
final public static function getInstance()
    {
        $className = get_called_class();
        if (!isset(self::$_instances[$className])) {
            $instance = new $className();
            /* @var SingleTon $instance */
            $instance->init();
            self::$_instances[$className] = $instance;
        }
        return self::$_instances[$className];
    }
414726
public function getDir()
    {
        if ($this->dir === null) {
            $rc = new \ReflectionClass($this);
            $this->dir = dirname($rc->getFileName());
        }
        return $this->dir;
    }
1342656
public static function getInstance(){
		if(!is_object(self::$instance)){
			if(DEBUG_CACHE){
				BLog::addToLog('[BCache]: Creating cache object ('.CACHE_TYPE.')...');
				}
			switch(CACHE_TYPE){
				case 'files':
					self::$instance=new \Brilliant\Cache\BCacheFiles();
					break;
				case 'memcache':
					bimport('cache.memcache');
					self::$instance=new \Brilliant\Cache\BCacheMemcache();
					break;
				case 'memcached':
					bimport('cache.memcached');
					self::$instance=new \Brilliant\Cache\BCacheMemcached();
					break;
				default:
					self::$instance=NULL;
					break;
				}
			}
		return self::$instance;
		}
664862
public function getFileSystem()
    {
        if (null == $this->fileSystem) {
            $this->setFileSystem(Helper::getFileSystem());
        }

        return $this->fileSystem;
    }
1091635
public static ImageLoader getInstance() {
		if (instance == null) {
			synchronized (ImageLoader.class) {
				if (instance == null) {
					instance = new ImageLoader();
				}
			}
		}
		return instance;
	}
828461
protected function getFileSystem()
    {
        if (null === $this->filesystem) {
            /** @var FileSystemService $fileSystemService */
            $fileSystemService = $this->getServiceManager()->get(FileSystemService::SERVICE_ID);
            $this->filesystem = $fileSystemService->getFileSystem($this->getOption(self::OPTION_FILESYSTEM));
        }

        return $this->filesystem;
    }
748132
public static FileSystemManager getFileSystemManager() {
        try {
            final FileSystemManager manager = VFS.getManager();
            if (manager.getBaseFile() == null) {
                // if no base file exists, set the working directory to base
                // dir.
                ((DefaultFileSystemManager) manager).setBaseFile(new File("."));
            }
            return manager;
        } catch (final FileSystemException e) {
            throw new IllegalStateException(e);
        }
    }
795167
public static function getInstance()
    {
        if (!self::$_instance) {
            self::$_instance = new Environment();
            Configure::write('Environment.initialized', true);
        }

        return self::$_instance;
    }
703205
public static function getInstance(bool $normalize = null): Filesystem
    {
        if ($normalize === true) {
            $instance = &static::$safe;
        } elseif ($normalize === false) {
            $instance = &static::$unsafe;
        } else {
            $instance = &static::$default;
        }

        if (null === $instance) {
            $instance = new static($normalize);
        }

        return $instance;
    }
1297678
public static function & GetSystem () {
		$app = self::$app ?: self::$app = & \MvcCore\Application::GetInstance();
		$systemConfigClass = $app->GetConfigClass();
		$appRootRelativePath = $systemConfigClass::GetSystemConfigPath();
		if (!isset(self::$configsCache[$appRootRelativePath])) 
			self::$configsCache[$appRootRelativePath] = & self::getConfigInstance(
				$appRootRelativePath, TRUE
			);
		return self::$configsCache[$appRootRelativePath];
	}