Skip to content

Commit

Permalink
Criado CacheableRepository e method deleteFolder in StorageMnager
Browse files Browse the repository at this point in the history
  • Loading branch information
moura137 committed Feb 15, 2017
1 parent 2f48060 commit 4e3d73b
Show file tree
Hide file tree
Showing 9 changed files with 799 additions and 1 deletion.
33 changes: 33 additions & 0 deletions src/NwLaravel/FileStorage/StorageManager.php
Expand Up @@ -161,6 +161,39 @@ public function deleteFile($filename)
return $this->storage->delete($filename);
}

/**
* Delete Folder
*
* @param string $folder Path Folder
*
* @return bool
*/
public function deleteFolder($path)
{
if ($this->isFile($path)) {
return false;
}

return $this->storage->deleteDirectory($path);
}

/**
* Files in Folder
*
* @param string $folder
* @param bool $recursive
*
* @return array
*/
public function files($path, $recursive = false)
{
if ($this->isFile($path)) {
return null;
}

return $this->storage->files($path, (bool) $recursive);
}

/**
* UploadFile
*
Expand Down

0 comments on commit 4e3d73b

Please sign in to comment.