createManifest method

@param                                  $path
@param \Codex\Support\Collection|File[] $files

@return array
333614
protected  function createManifest($path, $files)
    {
        $data = [ ];
        foreach ( $files as $file ) {
            $data[] = [
                'type'      => $file[ 'type' ],
                'name'      => $file[ 'entity' ][ 'name' ],
                'full_name' => $file[ 'entity' ][ 'full_name' ],
                'namespace' => $file[ 'entity' ][ 'namespace' ],
            ];
        }
        $this->fs->put($path, Util::exportArray($data));
        return $data;
    }
969401
public function uploadAll($files,$path){
        if( is_array($files) && count($files) > 0 ){
            $n = count($files);
            if( $n <= $this->config['upload']['number'] ){
                $res = array();
                $notresult = array();
                foreach ($files as $key => $value) {
                    $file = $this->upload($value,$path);
                    if( $file ){
                        $this->createThumb($file,$path);
                        $res[] = $file->getFilename();
                    }else{
                        $notresult[] = $value->getClientOriginalName();
                    }
                }
                $r = '';
                $n2 = count($res);
                $result = array("query"=>"BE_UPLOADALL_UPLOADS %s / %s","params"=>array($n2,$n));
                if(count($notresult)>0){
                    $result['query'] = $result['query'].' | BE_UPLOADALL_NOT_UPLOADS ';
                    $i=0;
                    $n = count($notresult);
                    foreach ($notresult as $value) {
                        $result['query'] = $result['query'] . ' %s';
                        if( $n - 1 > $i ){
                            $result['query'] = $result['query'] . ',';
                            $value = $value.',';
                        }
                        $result['params'][] = $value;
                        $i++;

                    }
                    $this->setInfo(array("status"=>0));
                }
                $this->setInfo(array("msg"=>$result));
                return $res;
            }else{
                $result = array("query"=>"BE_UPLOAD_MAX_UPLOAD %s","params"=>array($this->config['upload']['number']));
                $this->setInfo(array("msg"=>$result,"status"=>0));
            }
        }else{
            return ;
        }
    }
349834
private function ls72(string $path) : array
    {
        $list = [];
        foreach ($this->mlsd($path) as $fileInfo) {
            $list[] = new File($fileInfo);
        }
        return $list;
    }
121778
public static function create( $path ) 
	{	
		if ( is_null( $path ) ) 
		{
			return new static();
		}
		
		// use the orbit path if we are relative
		if ( substr( $path, 0, 1 ) != '/' ) 
		{
			$path = ORBITPATH.$path;
		}
		
		// check the path
		if ( substr( $path, -1 ) != '/' ) 
		{
			$path .= '/';
		}
		
		$blueprint = $path.'blueprint.json';
		
		if ( !file_exists( $blueprint ) ) 
		{
			throw new CCException( "CCOrbit_Ship::create - clould not find a blueprint at {$blueprint}." );
		}
		
		if ( !$blueprint_data = CCJson::read( $blueprint ) )
		{
			throw new CCException( "CCOrbit_Ship::create - invalid blueprint at {$blueprint}." );
		}
		
		return static::blueprint( $blueprint_data, $path );
	}
488613
public function mkdir(string $path = ""): File {
		if (!empty($path)) {
			$dir = new File(Paths::appendPath($this->getUrl(), $path));
			$dir->mkdir();

			return $dir;
		} else {
			if (!$this->isDirectory() && !$this->isFile()) {
				$this->manager->createDir($this->getUrl());
			}

			return $this;
		}
	}
311848
public static function create($paths)
    {
        $backends = array(
            new Backend\Inotifywait($paths),
            new Backend\Fswatch($paths),
            new Backend\Watchmedo($paths),
            new Backend\Inotify($paths),
            new Backend\Poll($paths),
        );
        foreach ($backends as $b) {
            if ($b->isAvailable()) {
                $backend = $b;
                break;
            }
        }
        return $backend;
    }
1124736
public function createFolder($path)
    {
        $this->setupRequest([
            'path' => $this->normalizePath($path),
        ]);

        $this->apiEndpoint = 'files/create_folder';

        $response = $this->doDropboxApiRequest();
        $response['.tag'] = 'folder';

        return $response;
    }
1015606
public function create( $path = '' )
    {
        $this->sessionPath = $path;

        if ( file_exists( $path ) )
        {
            $this->getFileContents();
        }
        else
        {
            $this->items = [ ];
        }
    }
126111
protected function createDirectory($path)
    {
        if (!File::isDirectory($path)) {
            File::makeDirectory($path, 0777, true, true);
        }

        return $this;
    }
735424
protected function _createDirectoriesFor($path)
    {
        if (!is_dir($path)) {
            $oldUmask = umask(0);
            if ( !@mkdir($path, $this->_octdec($this->_options['cache_directory_umask']), true)) {
                $lastErr = error_get_last();
                umask($oldUmask);
                Zend_Cache::throwException("Can't create directory: {$lastErr['message']}");
            }
            umask($oldUmask);
        }
    }
805173
public static function create($files, $path, $quality = 0)
    {
        switch( self::getFileExtension($path) )
        {
            case 'png' : 
                if( $quality > 10 )
                {
                    $quality = (int) ($quality / 10);
                }
                return imagepng($files, $path, $quality ?: 8 );
            case 'gif' : return imagegif($files, $path);
            case 'jpg' :
            case 'jpeg': 
            default    : return imagejpeg($files, $path, $quality ?: 80);
        }
    }
1314367
protected function createTargetDirectory($path)
    {
        $directory = dirname($path);
        if (!file_exists($directory)) {
            if (!is_writeable($this->getExistingPath($directory))) {
                throw new Exception('The directory "' . $directory . '" isn\'t writeable!');
            }
            
            mkdir($directory, 0755, true);
        }
    }
963086
static function from ($path, $flags = 4096)
  {
    try {
      return new static (new FilesystemIterator($path, $flags));
    }
    catch (\Exception $e) {
      // Convert UnexpectedValueException to another type to prevent problems with some error handlers.
      throw new \InvalidArgumentException($e->getMessage ());
    }
  }
964720
public function createFromConfig(string $path) : SettingsContract {
        $configData = (array) $this->filesystem->getRequire($path);

        return $this->createFromData($configData);
    }
153152
static function createDirectories($path) {

		if (!$path) throw new \InvalidArgumentException("\$path can not be empty.");

		/*
		$parts=explode("/",$path);
		$pathPart="";
		foreach($parts as $i=>$p) {
			if ($i) $pathPart.="/";
			$pathPart.=$p;
			if ($pathPart) {
				if (@file_exists($pathPart) and !is_dir($pathPart)) {
					throw new FileException("\"$pathPart\" is a regular file!");
				}
				if (!(@file_exists($pathPart))) {
					self::mkdir($pathPart,false);
				}
			}
		}
		return $pathPart;
		 *
		 */

		if (file_exists($path)) {
			if (is_dir($path)) {
				return $path;
			}
			throw new FileException("\"$path\" is a regular file!");
		}

		$ret = @mkdir($path, 0777, true);
		if (!$ret) {
			throw new FileException("Directory \"$path\ could not be created.");
		}

		return $path;
	}
204669
public static function createFromPath($path, array $replaces = [])
    {
        $stub = static::create($path, $replaces);

        $stub->setBasePath('');

        return $stub;
    }
373116
private function createFilePath($path)
    {
        $dir = dirname($path);
        return file_exists($dir) || FileHelper::createDirectory($dir, 0775, true);
    }