Tree

class tekdrive.models.Tree(tekdrive: TekDrive)

Provides directory listing.

get(*, folder_id: [<class 'str'>] = None, silo: Optional[str] = None, depth: Optional[int] = 1, folders_only: bool = False, include_trashed: bool = False) → tekdrive.models.drive.folder.Folder

Get the tree representation from a starting folder.

Parameters
  • folder_id – Unique ID of starting folder to start the tree from.

  • depth – How many nested levels to return.

  • silo – Get tree for the provided silo. Values: "SHARES" or "PERSONAL".

  • folders_only – Only include folders in the tree results? Default: False.

  • include_trashed – Include files and folders that are in the trashcan.

Examples

Get tree from starting folder by id:

tree = td.tree.get(folder_id="3b525331-9da7-4e8d-b045-4acdba8d9dc7")

Get tree for the SHARES silo, excluding files:

tree = td.tree.get(silo="SHARES", folders_only=True)
Returns

Folder