protected function hasCorrectPermissionForUpdate() : bool
    {
        if (! $this->pathToUpdate) {
            throw new \Exception('No directory set for update. Please set the update with: setPathToUpdate(path).');
        }

        $collection = collect($this->pathToUpdate->files())->each(function ($file) { /* @var \SplFileInfo $file */
            if (! File::isWritable($file->getRealPath())) {
                event(new HasWrongPermissions($this));

                return false;
            }
        });

        return true;
    }
protected function hasCorrectPermissionForUpdate() : bool
    {
        if (! $this->pathToUpdate) {
            throw new \Exception('No directory set for update. Please set the update with: setPathToUpdate(path).');
        }

        $collection = collect($this->pathToUpdate->files())->each(function ($file) { /* @var \SplFileInfo $file */
            if (! File::isWritable($file->getRealPath())) {
                event(new HasWrongPermissions($this));

                return false;
            }
        });

        return true;
    }
protected function hasCorrectPermissionForUpdate ( ) : bool { if ( ! $ this -> pathToUpdate ) { throw new \ Exception ( 'No directory set for update. Please set the update with: setPathToUpdate(path).' ) ; } $ collection = collect ( $ this -> pathToUpdate -> files ( ) ) -> each ( function ( $ file ) { /* @var \SplFileInfo $file */ if ( ! File :: isWritable ( $ file -> getRealPath ( ) ) ) { event ( new HasWrongPermissions ( $ this ) ) ; return false ; } } ) ; return true ; }
Check a given directory recursively if all files are writeable.

@throws \Exception

@return bool
Check a given directory recursively if all files are writeable .