cterasdk.edge.files.browser module#

class cterasdk.edge.files.browser.FileBrowser(edge)#

Bases: BaseCommand

Edge Filer File Browser APIs

copy(path, destination=None, overwrite=False)#

Copy a file or a folder

Parameters:
  • path (str) – Source file or folder path

  • destination (str) – Destination folder path

  • overwrite (bool,optional) – Overwrite on conflict, defaults to False

delete(path)#

Delete a file

Parameters:

path (str) – File path

download(path, destination=None)#

Download a file

Parameters:
  • path (str) – The file path on the Edge Filer

  • destination (str,optional) – File destination, if it is a directory, the original filename will be kept, defaults to the default directory

download_as_zip(cloud_directory, files, destination=None)#

Download a list of files and/or directories from a cloud folder as a ZIP file

Warning

The list of files is not validated. The ZIP file will include only the existing files and directories

Parameters:
  • cloud_directory (str) – Path to the cloud directory

  • files (list[str]) – List of files and/or directories in the cloud folder to download

  • destination (str,optional) – File destination, if it is a directory, the filename will be calculated, defaults to the default directory

static get_object_path(path)#
makedirs(path)#

Create a directory recursively

Parameters:

path (str) – Directory path

mkdir(path)#

Create a new directory

Parameters:

path (str) – Directory path

move(path, destination=None, overwrite=False)#

Move a file or a folder

Parameters:
  • path (str) – Source file or folder path

  • destination (str) – Destination folder path

  • overwrite (bool,optional) – Overwrite on conflict, defaults to False

upload(path, destination)#

Upload a file

Parameters:
  • path (str) – Local path

  • destination (str) – Remote path