Skip to content

Commit

Permalink
Adds Client::getFolderByPath()
Browse files Browse the repository at this point in the history
  • Loading branch information
Max13 committed Oct 2, 2020
1 parent 4d0badc commit cce49a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ public function getFolder($folder_name) {
return $this->getFolders(false)->where("name", $folder_name)->first();
}

/**
* Get a folder instance by a folder path
* @param $folder_path
*
* @return mixed
* @throws ConnectionFailedException
* @throws FolderFetchingException
*/
public function getFolderByPath($folder_path) {
return $this->getFolders(false)->where("path", $folder_path)->first();
}

/**
* Get folders list.
* If hierarchical order is set to true, it will make a tree of folders, otherwise it will return flat array.
Expand Down

0 comments on commit cce49a4

Please sign in to comment.