Skip to content

Commit 6e77b6b

Browse files
Merge pull request #4 from Slandais/add-recursive-option
Add recursive option for ls web-service and zip archive
2 parents 81b8647 + b168d6d commit 6e77b6b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Services/DirectoryService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
class DirectoryService extends AbstractService
1313
{
1414
/**
15-
* @param string $namespace
15+
* @param string $namespace
16+
* @param boolean $recursive
1617
* @return mixed
1718
*/
18-
public function ls(string $namespace)
19+
public function ls(string $namespace, bool $recursive = false)
1920
{
20-
$uri = $this->apiUrl.'/'.static::API_V2_FS_COMMAND.'/'.$namespace.'/?children=df';
21+
$recursive = $recursive ? 'true' : 'false';
22+
$uri = $this->apiUrl.'/'.static::API_V2_FS_COMMAND.'/'.$namespace.'/?children=dfz&recursive='.$recursive;
2123

2224
return $this->exec($uri);
2325
}

0 commit comments

Comments
 (0)