File Browser#
Download#
- FileBrowser.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
edge.files.download('cloud/users/Service Account/My Files/Documents/Sample.docx')
- FileBrowser.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
edge.files.download_as_zip('network-share/docs', ['Sample.docx', 'Summary.xlsx'])
Create Directory#
- FileBrowser.mkdir(path)
Create a new directory
- Parameters:
path (str) – Directory path
edge.files.mkdir('cloud/users/Service Account/My Files/Documents')
- FileBrowser.makedirs(path)
Create a directory recursively
- Parameters:
path (str) – Directory path
edge.files.makedirs('cloud/users/Service Account/My Files/The/quick/brown/fox')
Copy#
- FileBrowser.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
"""
Copy the 'Documents' folder from Bruce Wayne to Alice Wonderland
The full path of the documents folder after the copy: 'cloud/users/Alice Wonderland/My Files/Documents'
"""
edge.files.copy('cloud/users/Bruce Wayne/My Files/Documents', destination='cloud/users/Alice Wonderland/My Files')
"""Copy the file Summary.xlsx to another directory, and overwrite on conflict"""
edge.files.copy('cloud/users/Bruce Wayne/My Files/Summary.xlsx', destination='cloud/users/Bruce Wayne/Spreadsheets', overwrite=True)
Move#
- FileBrowser.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
"""
Move the 'Documents' folder from Bruce Wayne to Alice Wonderland
The full path of the documents folder after the move: 'cloud/users/Alice Wonderland/My Files/Documents'
"""
edge.files.move('cloud/users/Bruce Wayne/My Files/Documents', destination='cloud/users/Alice Wonderland/My Files')
"""Move the file Summary.xlsx to another directory, and overwrite on conflict"""
edge.files.move('cloud/users/Bruce Wayne/My Files/Summary.xlsx', destination='cloud/users/Bruce Wayne/Spreadsheets', overwrite=True)
Delete#
- FileBrowser.delete(path)
Delete a file
- Parameters:
path (str) – File path
edge.files.delete('cloud/users/Service Account/My Files/Documents')