File Browser#
This article describes the file-browser APIs available in the CTERA Portal, which provide programmatic access to files and directories.
The APIs support both synchronous and asynchronous execution models, enabling developers to choose the approach best suited to their integration needs, from real-time operations to background processing.
Preface: Authentication#
All file-browser operations require an authenticated session with the CTERA Portal.
Authentication is performed by creating a portal context and calling login with valid credentials.
Once authenticated, the files attribute provides access to the file-browser APIs.
Synchronous Authentication#
Set cterasdk.settings.core.syn.settings.connector.ssl = False to disable SSL verification.
Authenticate as a tenant user using ServicesPortal:
with ServicesPortal('tenant.ctera.com') as user:
user.login(username, password)
files = user.files
Authenticate as a global administrator using GlobalAdmin:
with GlobalAdmin('global.ctera.com') as admin:
admin.login(username, password)
files = admin.files
Asynchronous Authentication#
Set cterasdk.settings.core.asyn.settings.connector.ssl = False to disable SSL verification.
Authenticate as a tenant user using AsyncServicesPortal:
async with AsyncServicesPortal('tenant.ctera.com') as user:
await user.login(username, password)
files = user.files
Authenticate as a global administrator using AsyncGlobalAdmin:
async with AsyncGlobalAdmin('global.ctera.com') as admin:
await admin.login(username, password)
files = admin.files
User Roles and Permissions#
The file access APIs are available to the following user roles:
Global Administrators with the
Access End User Folderspermission enabled.Team Portal Administrators with the
Access End User Folderspermission enabled.End Users, accessing their personal cloud drive folders.
For more information about configuring administrator permissions, see Customizing Administrator Roles.
Key Objects#
This section describes the core objects returned by the file-browser APIs.
- class cterasdk.cio.core.types.PortalResource(i, name, path, is_dir, deleted, size, permalink, last_modified, volume, worm)
Class for a Portal Filesystem Resource.
- Variables:
id (int,optional) – Resource ID, defaults to
Noneif not existsname (str) – Resource name
path –
cterasdk.cio.types.ServicesPortalPathorcterasdk.cio.types.GlobalAdminPathis_dir (bool) –
Trueif directory,Falseotherwisedeleted (bool) –
Trueif deleted,Falseotherwisesize (int) – Size
last_modified (datetime.datetime) – Last Modified
extension (str) – Extension
permalink (str) – Permalink
volume (cterasdk.cio.core.types.PortalVolume,optional) – Volume information.
worm (cterasdk.cio.core.types.ComplianceSettings,optional) – Compliance Retention Settings.
- static from_server_object(server_object)
- property with_user_namespace
- class cterasdk.cio.core.types.PortalVolume(i, name, group, protected, owner)
Class for a Portal Cloud Volume.
- Variables:
id (int) – Cloud Drive Folder ID
name (str) – Cloud Drive Folder Name
group (int) – Folder Group ID
protected (bool) – Passphrase-Protected
owner (cterasdk.cio.core.types.VolumeOwner) – Volume owner information.
- static from_server_object(server_object)
- class cterasdk.cio.core.types.VolumeOwner(i, name)
Class for a Cloud Volume Owner.
- Variables:
id (str) – Owner ID
id – Owner Full Name.
namespace (str) – User namespace.
- property user_namespace
- class cterasdk.cio.core.types.PreviousVersion(server_object)
Class Representing a Previous Version
- Variables:
current (bool) – Current
path –
cterasdk.cio.types.ServicesPortalPathorcterasdk.cio.types.GlobalAdminPathstart_time (datetime.datetime) – Snapshot start time
end_time (datetime.datetime) – Snapshot end time
- static from_server_object(server_object)
Synchronous API#
Listing Files and Directories#
- FileBrowser.listdir(path=None, include_deleted=False)
List directory contents.
- Parameters:
path (str, optional) – Path. Defaults to the Cloud Drive root.
include_deleted (bool, optional) – Include deleted files. Defaults to False.
- Returns:
Directory contents.
- Return type:
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
cterasdk.exceptions.io.core.ListDirectoryError – Raised on error fetching directory contents.
resources = files.listdir('My Files')
for r in resources:
print(r.name, r.is_dir)
- FileBrowser.walk(path=None, include_deleted=False)
Walk directory contents.
- Parameters:
path (str, optional) – Path to walk. Defaults to the root directory.
include_deleted (bool, optional) – Include deleted files. Defaults to False.
- Returns:
A generator of file-system objects.
- Return type:
Iterator[cterasdk.cio.core.types.PortalResource]
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
for resource in files.walk('My Files'):
if not resource.is_dir and resource.extension == 'pdf':
files.download(resource.path)
Listing Files from Previous Versions#
- FileBrowser.versions(path)
List snapshots of a file or directory.
- Parameters:
path (str) – Path.
- Returns:
List of versions.
- Return type:
- Raises:
cterasdk.exceptions.io.core.GetVersionsError – Raised on error retrieving versions.
# List all versions of a file
versions = files.versions('My Files/Keystone Project.docx')
for v in versions:
print(v.start_time, v.end_time, v.current)
# List files in a previous version
prev_version = next(v for v in versions if not v.current)
for f in files.listdir(prev_version.path):
print(f'File in previous version: {f.path}, Size: {f.size}, Last modified: {f.last_modified}')
# Download files from a previous version
for f in files.listdir(prev_version.path):
local_path = files.download(f.path)
print(local_path)
Inspecting Files#
- FileBrowser.properties(path)
Get object properties.
- Parameters:
path (str) – Path.
- Returns:
Object properties.
- Return type:
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – Raised on error retrieving object metadata.
metadata = files.properties('My Files/Keystone Project.docx')
print(metadata.size, metadata.last_modified)
- FileBrowser.exists(path)
Check whether an item exists.
- Parameters:
path (str) – Path.
- Returns:
True if the item exists, False otherwise.
- Return type:
bool
exists = files.exists('My Files/Keystone Project.docx')
Retrieve a Permalink#
- FileBrowser.permalink(path)
Get permalink for a path.
- Parameters:
path (str) – Path.
- Returns:
Permalink.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – Raised on error retrieving object metadata.
permalink = files.permalink('My Files/Keystone Project.docx')
print(f'Permalink: {permalink}')
Create a Public Link#
- FileBrowser.public_link(path, access='RO', expire_in=30)
Create a public link to a file or folder.
- Parameters:
path (str) – Path of the file or folder.
access (str, optional) – Access policy of the link. Defaults to ‘RO’.
expire_in (int, optional) – Days until link expires. Defaults to 30.
- Returns:
Public link.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateLinkError – Raised on failure to generate public link.
public_url = files.public_link('My Files/Keystone Project.docx', access='RO', expire_in=7)
print(f'Public link: {public_url}')
preview_link = files.public_link('My Files/Keystone Market Overview.pdf', access='PO', expire_in=7)
print(f'Preview-only link: {preview_link}')
public_url_rw = files.public_link('My Files', access='RW', expire_in=30)
print(f'Public read-write link: {public_url_rw}')
File Handles#
- FileBrowser.handle(path, objects=None)
Get a file handle.
- Parameters:
path (str) – Path to a file.
objects (list[str],optional) – Files and folders to include.
- Returns:
File handle.
- Return type:
- Raises:
cterasdk.exceptions.io.core.OpenError – Raised on error to obtain a file handle.
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
"""Retrieve a handle for a file"""
handle = files.handle('My Files/Keystone Project.docx')
"""Retrieve a handle for a folder"""
handle = files.handle('My Files/Project X')
"""Retrieve a handle for individual files within a folder"""
handle = files.handle('My Files', ['Keystone Project.docx', 'Images', 'Notes.txt'])
Downloading Files#
- FileBrowser.download(path, objects=None, destination=None)
Download a file.
- Parameters:
path (str) – Path.
objects (list[str],optional) – List of files and / or directory names to download.
destination (str, optional) – File destination. If a directory is provided, the original filename is preserved. Defaults to the default download directory.
- Returns:
Path to the local file.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.OpenError – Raised on error to obtain a file handle.
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
"""Download a file"""
path = files.download('My Files/Keystone Project.docx')
"""Download a folder"""
path = files.download('My Files/Project X')
"""Download individual files within a folder"""
zip_archive = files.download('My Files', ['Keystone Project.docx', 'Images'], destination='/tmp/MyFiles.zip')
Create Directories#
- CloudDrive.mkdir(path)
Create a directory.
- Parameters:
path (str) – Directory path.
- Returns:
Remote directory path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateDirectoryError – Raised on error creating directory.
new_dir = files.mkdir('My Files/NewProject')
print(f'Created directory: {new_dir}')
- CloudDrive.makedirs(path)
Recursively create a directory.
- Parameters:
path (str) – Directory path.
- Returns:
Remote directory path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateDirectoryError – Raised on error creating directory.
nested_dir = files.makedirs('My Files/Projects/2026/Q1')
print(f'Created nested directories: {nested_dir}')
Uploading Files#
- CloudDrive.upload_file(path, destination)
Upload a file.
- Parameters:
path (str) – Local path.
destination (str) – Remote path.
- Returns:
Remote file path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.UploadError – Raised on upload failure.
# Upload from a local path to a directory
remote_path = files.upload_file('/tmp/Keystone Project.docx', 'My Files')
print(f'File uploaded to: {remote_path}')
# Upload from a local path and rename the file at the destination
remote_path = files.upload_file('/tmp/Keystone Project.docx', 'My Files/Keystone 2026.docx')
print(f'File uploaded to: {remote_path}')
- CloudDrive.upload(destination, handle, name=None, size=None)
Upload from file handle.
- Parameters:
destination (str) – Remote path.
handle (object) – File-like handle.
size (str, optional) – File size. Defaults to content length.
name (str, optional) – Filename to use if it cannot be derived from
destination
- Returns:
Remote file path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.UploadError – Raised on upload failure.
name = 'Keystone Project.docx'
destination = 'My Files'
# Upload from file handle
with open('/tmp/Keystone Project.docx', 'rb') as f:
remote_path = files.upload(name, destination, f)
print(f'File uploaded from handle to: {remote_path}')
# Upload from string or bytes
remote_path = files.upload(name, destination, handle=b'Sample content for ProjectPlan.')
print(f'File uploaded from bytes to: {remote_path}')
Renaming Files and Folders#
- CloudDrive.rename(path, name, *, resolver=None, wait=True)
Rename a file or folder.
- Parameters:
path (str) – Path of the file or directory.
name (str) – New name.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults None.
wait (bool, optional) – Wait for task completion. Defaults to True.
- Returns:
Task status object, or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.RenameError – Raised on error renaming object.
remote_path = files.rename('My Files/Keystone Project.docx', 'Keystone Project 2026.docx')
print(f'Renamed file: {remote_path}')
Copying and Moving Files and Folders#
- FileBrowser.copy(*paths, destination=None, resolver=None, cursor=None, wait=True)
Copy one or more files or folders.
- Parameters:
paths (list[str]) – Paths to copy.
destination (str) – Destination path.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults to None.
cursor (cterasdk.common.object.Object) – Resume copy from cursor.
wait (bool, optional) – Wait for task completion. Defaults to True.
- Returns:
Task status object, or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.CopyError – Raised on failure to copy resources.
# Copy files into a destination directory
result = files.copy('My Files/Keystone Project.docx', 'My Files/Keystone Notes.txt', destination='Archive')
print(f'Files copied: {result}')
# Copy multiple files at once while renaming them. Requires explicitly defining the target path
result = files.copy(
('My Files/Keystone Project.docx', 'Archive/Keystone Project 2026.docx'),
('My Files/Keystone Notes.txt', 'Archive/Keystone Notes 2026.txt')
)
print(f'Files copied with explicit paths: {result}')
- CloudDrive.move(*paths, destination=None, resolver=None, cursor=None, wait=True)
Move one or more files or folders.
- Parameters:
paths (list[str]) – Paths to move.
destination (str) – Destination path.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults to None.
cursor (cterasdk.common.object.Object) – Resume move from cursor.
wait (bool, optional) – Wait for task completion. Defaults to True.
- Returns:
Task status object, or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.MoveError – Raised on error moving resources.
# Move files into a destination directory
result = files.move('My Files/Keystone Project.docx', 'My Files/Keystone Notes.txt', destination='Archive')
print(f'Files moved: {result}')
# Move multiple files at once while renaming them. Requires explicitly defining the target path
result = files.move(
('My Files/Keystone Project.docx', 'Archive/Keystone 2026.docx'),
('My Files/Keystone Notes.txt', 'Archive/Keystone Notes 2026.txt')
)
print(f'Files moved with explicit paths: {result}')
Delete or Recovering Files and Folders#
- CloudDrive.delete(*paths, wait=True)
Delete one or more files or folders.
- Parameters:
paths (list[str]) – Paths to delete.
wait (bool, optional) – Wait for task completion. Defaults to True.
- Returns:
Task status object, or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.DeleteError – Raised on error deleting resources.
result = files.delete('My Files/Project Keystone.docx')
print(f'Deleted file: {result}')
result = files.delete('My Files/Project Keystone.docx', 'My Files/Keystone Notes.txt', 'Archive/Keystone')
print(f'Deleted multiple files/folders: {result}')
- CloudDrive.undelete(*paths, wait=True)
Recover one or more files or folders.
- Parameters:
paths (list[str]) – Paths to recover.
wait (bool, optional) – Wait for task completion. Defaults to True.
- Returns:
Task status object, or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.RecoverError – Raised on error recovering resources.
result = files.undelete('My Files/Project Keystone.docx')
print(f'Recovered file: {result}')
result = files.undelete('My Files/Project Keystone.docx', 'My Files/Keystone Notes.txt', 'Archive/Keystone')
print(f'Recovered multiple files/folders: {result}')
Managing S3 Credentials#
CTERA Portal supports programmatic access to cloud storage via the S3 protocol, also known as CTERA Fusion. This allows users and administrators to manage files and folders using standard S3 tools and SDKs, such as the Amazon SDK for Python (boto3).
For details on enabling CTERA Fusion and supported S3 features, see the CTERA KB article.
The following example demonstrates how to create S3 credentials and interact with the portal using boto3.
import boto3
bucket = 'my-bucket-name'
local_file = './ProjectOverview.docx'
remote_key = 'documents/ProjectOverview.docx'
download_file = './ProjectOverview_Copy.docx'
# CTERA Fusion: Create S3 credentials (user or admin)
creds = user.credentials.s3.create() # or admin.credentials.s3.create(core_types.UserAccount('username', 'domain'))
# Instantiate boto3 client
client = boto3.client('s3', endpoint_url='https://tenant.ctera.com:8443', aws_access_key_id=creds.accessKey,
aws_secret_access_key=creds.secretKey, verify=False)
# List buckets
for b in client.list_buckets()['Buckets']:
print(b['Name'])
# Upload a file
client.upload_file(local_file, bucket, remote_key)
# List files in a bucket
for item in client.list_objects_v2(Bucket=bucket).get('Contents', []):
print(item['Key'], item['LastModified'])
# List files with pagination
for page in client.get_paginator('list_objects_v2').paginate(Bucket=bucket):
for item in page.get('Contents', []):
print(item['Key'], item['LastModified'])
# Download a file
client.download_file(bucket, remote_key, download_file)
Note
For more details on using the Amazon SDK for Python (boto3), refer to the official boto3 documentation.
Asynchronous API#
- async FileBrowser.handle(path, objects)
Get a file handle.
- Parameters:
path (str) – Path to a file.
objects (list[str],optional) – Files and folders to include.
- Returns:
File handle.
- Return type:
- Raises:
cterasdk.exceptions.io.core.OpenError – Raised on error to obtain a file handle.
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
- async FileBrowser.download(path, objects=None, destination=None)
Download a file.
- Parameters:
path (str) – Path.
objects (list[str],optional) – List of files and / or directory names to download.
destination (str, optional) – File destination. If a directory is provided, the original filename is preserved. Defaults to the default download directory.
- Returns:
Path to the local file.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.OpenError – Raised on error to obtain a file handle.
cterasdk.exceptions.io.core.GetMetadataError – If the directory was not found.
cterasdk.exceptions.io.core.NotADirectoryException – If the target path is not a directory.
- async FileBrowser.listdir(path=None, include_deleted=False)
List directory contents.
- Parameters:
path (str, optional) – Path, defaults to Cloud Drive root.
include_deleted (bool, optional) – Include deleted files. Defaults to False.
- Returns:
Directory contents.
- Return type:
AsyncIterator[cterasdk.cio.core.types.PortalResource]
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – If directory not found.
cterasdk.exceptions.io.core.NotADirectoryException – If target path is not a directory.
cterasdk.exceptions.io.core.ListDirectoryError – Raised on error fetching directory contents.
- async FileBrowser.versions(path)
List snapshots of a file or directory.
- Parameters:
path (str) – Path.
- Returns:
List of versions.
- Return type:
- Raises:
cterasdk.exceptions.io.core.GetVersionsError – Raised on error retrieving versions.
- async FileBrowser.walk(path=None, include_deleted=False)
Walk directory contents.
- Parameters:
path (str, optional) – Path to walk, defaults to root directory.
include_deleted (bool, optional) – Include deleted files. Defaults to False.
- Returns:
Async generator of file-system objects.
- Return type:
AsyncIterator[cterasdk.cio.edge.types.PortalResource]
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – If directory not found.
cterasdk.exceptions.io.core.NotADirectoryException – If target path is not a directory.
- async FileBrowser.public_link(path, access='RO', expire_in=30)
Create a public link to a file or folder.
- Parameters:
path (str) – Path of file/folder.
access (str, optional) – Access policy. Defaults ‘RO’.
expire_in (int, optional) – Days until link expires. Defaults 30.
- Returns:
Public link.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateLinkError – Raised on failure generating public link.
- async FileBrowser.copy(*paths, destination=None, resolver=None, cursor=None, wait=False)
Copy one or more files or folders.
- Parameters:
paths (list[str]) – Paths to copy.
destination (str) – Destination path.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults None.
cursor (cterasdk.common.object.Object, optional) – Resume copy from cursor.
wait (bool, optional) – Wait for task completion. Defaults False.
- Returns:
Task status object or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.CopyError – Raised on failure copying resources.
- async CloudDrive.move(*paths, destination=None, resolver=None, cursor=None, wait=False)
Move one or more files or folders.
- Parameters:
paths (list[str]) – Paths to move.
destination (str) – Destination path.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults None.
cursor (cterasdk.common.object.Object, optional) – Resume move from cursor.
wait (bool, optional) – Wait for task completion. Defaults False.
- Returns:
Task status object or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.MoveError – Raised on error moving resources.
- async FileBrowser.permalink(path)
Get permalink for a path.
- Parameters:
path (str) – Path.
- Returns:
Permalink.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.GetMetadataError – Raised on error retrieving object metadata.
- async CloudDrive.upload(destination, handle, name=None, size=None)
Upload from file handle.
- Parameters:
destination (str) – Remote path.
handle (object) – File-like handle.
size (str, optional) – File size. Defaults to content length.
name (str, optional) – Filename to use if it cannot be derived from
destination
- Returns:
Remote file path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.UploadError – Raised on upload failure.
- async CloudDrive.upload_file(path, destination)
Upload a file.
- Parameters:
path (str) – Local path.
destination (str) – Remote path.
- Returns:
Remote file path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.UploadError – Raised on upload failure.
- async CloudDrive.mkdir(path)
Create a directory.
- Parameters:
path (str) – Directory path.
- Returns:
Remote directory path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateDirectoryError – Raised on error creating directory.
- async CloudDrive.makedirs(path)
Recursively create a directory.
- Parameters:
path (str) – Directory path.
- Returns:
Remote directory path.
- Return type:
str
- Raises:
cterasdk.exceptions.io.core.CreateDirectoryError – Raised on error creating directory.
- async CloudDrive.rename(path, name, *, resolver=None, wait=False)
Rename a file or folder.
- Parameters:
path (str) – Path to rename.
name (str) – New name.
resolver (cterasdk.core.types.ConflictResolver, optional) – Conflict resolver. Defaults None.
wait (bool, optional) – Wait for task completion. Defaults False.
- Returns:
Task status object or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.RenameError – Raised on error renaming object.
- async CloudDrive.delete(*paths, wait=False)
Delete one or more files or folders.
- Parameters:
paths (list[str]) – Paths to delete.
wait (bool, optional) – Wait for task completion. Defaults False.
- Returns:
Task status object or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.DeleteError – Raised on error deleting resources.
- async CloudDrive.undelete(*paths, wait=False)
Recover one or more files or folders.
- Parameters:
paths (list[str]) – Paths to recover.
wait (bool, optional) – Wait for task completion. Defaults False.
- Returns:
Task status object or awaitable task.
- Return type:
cterasdk.common.object.Object or
cterasdk.lib.tasks.AwaitablePortalTask- Raises:
cterasdk.exceptions.io.core.RecoverError – Raised on error recovering resources.
- async CloudDrive.share(path, recipients, as_project=True, allow_reshare=True, allow_sync=True)
Share a file or folder.
- Parameters:
path (str) – Path to file/folder.
recipients (list[cterasdk.core.types.Collaborator]) – Recipients to share with.
as_project (bool, optional) – Share as team project. Defaults True if cloud folder.
allow_reshare (bool, optional) – Allow re-share. Defaults True.
allow_sync (bool, optional) – Allow sync. Defaults True if cloud folder.
- Returns:
Current list of share members.
- Return type:
- async CloudDrive.add_share_recipients(path, recipients)
Add share recipients.
- Parameters:
path (str) – Path of file/folder.
recipients (list[cterasdk.core.types.Collaborator]) – Recipients to add.
- Returns:
Current list of share members.
- Return type:
- async CloudDrive.remove_share_recipients(path, accounts)
Remove share recipients.
- Parameters:
path (str) – Path of file/folder.
accounts (list[cterasdk.core.types.PortalAccount]) – Accounts to remove.
- Returns:
Current list of share members.
- Return type:
- async CloudDrive.unshare(path)
Unshare a file or folder.
- Parameters:
path (str) – Path of file/folder.