public function createReleaseFolder($storagePath, $releaseName)
    {
        $subDirName = File::directories($storagePath);
        $directories = File::directories($subDirName[0]);

        File::makeDirectory($storagePath.'/'.$releaseName);

        foreach ($directories as $directory) { /* @var string $directory */
            File::moveDirectory($directory, $storagePath.'/'.$releaseName.'/'.File::name($directory));
        }

        $files = File::allFiles($subDirName[0], true);
        foreach ($files as $file) { /* @var \SplFileInfo $file */
            File::move($file->getRealPath(), $storagePath.'/'.$releaseName.'/'.$file->getFilename());
        }

        File::deleteDirectory($subDirName[0]);
    }
public function createReleaseFolder($storagePath, $releaseName)
    {
        $subDirName = File::directories($storagePath);
        $directories = File::directories($subDirName[0]);

        File::makeDirectory($storagePath.'/'.$releaseName);

        foreach ($directories as $directory) { /* @var string $directory */
            File::moveDirectory($directory, $storagePath.'/'.$releaseName.'/'.File::name($directory));
        }

        $files = File::allFiles($subDirName[0], true);
        foreach ($files as $file) { /* @var \SplFileInfo $file */
            File::move($file->getRealPath(), $storagePath.'/'.$releaseName.'/'.$file->getFilename());
        }

        File::deleteDirectory($subDirName[0]);
    }
public function createReleaseFolder ( $ storagePath , $ releaseName ) { $ subDirName = File :: directories ( $ storagePath ) ; $ directories = File :: directories ( $ subDirName [ 0 ] ) ; File :: makeDirectory ( $ storagePath . '/' . $ releaseName ) ; foreach ( $ directories as $ directory ) { /* @var string $directory */ File :: moveDirectory ( $ directory , $ storagePath . '/' . $ releaseName . '/' . File :: name ( $ directory ) ) ; } $ files = File :: allFiles ( $ subDirName [ 0 ] , true ) ; foreach ( $ files as $ file ) { /* @var \SplFileInfo $file */ File :: move ( $ file -> getRealPath ( ) , $ storagePath . '/' . $ releaseName . '/' . $ file -> getFilename ( ) ) ; } File :: deleteDirectory ( $ subDirName [ 0 ] ) ; }
Create a releas sub-folder inside the storage dir.

@param string $storagePath
@param string $releaseName
Create a releas sub - folder inside the storage dir .