src/Directory.php
public function copyAs($dest)
    {
        $dest = rtrim($dest, '/') . '/';

        $copy = new Directory($dest, $this->adapter); // create the destination directory

        foreach ($this->fs()->find('*')->asArray() as $file) {
            $file->copyAs($dest . $file->name());
        }

        return $copy;
    }
public function copyAs($dest)
    {
        $dest = rtrim($dest, '/') . '/';

        $copy = new Directory($dest, $this->adapter); // create the destination directory

        foreach ($this->fs()->find('*')->asArray() as $file) {
            $file->copyAs($dest . $file->name());
        }

        return $copy;
    }
public function copyAs ( $ dest ) { $ dest = rtrim ( $ dest , '/' ) . '/' ; $ copy = new Directory ( $ dest , $ this -> adapter ) ; // create the destination directory foreach ( $ this -> fs ( ) -> find ( '*' ) -> asArray ( ) as $ file ) { $ file -> copyAs ( $ dest . $ file -> name ( ) ) ; } return $ copy ; }
Copies the directory to the provided destination and returns the copy.

@param  string $dest
@return Tarsana\Filesystem\Directory

@throws Tarsana\Filesystem\Exceptions\FilesystemException if unable to create the destination directory.
Copies the directory to the provided destination and returns the copy .