agentsociety.filesystem.client

Module Contents

Classes

FileSystemClient

FileSystem client

Data

API

agentsociety.filesystem.client.__all__

[‘FileSystemClient’]

class agentsociety.filesystem.client.FileSystemClient(home_dir: str)

FileSystem client

Initialization

Initialize FileSystem client

get_absolute_path(remote_path: str) str

Get absolute path

upload(data: bytes, remote_path: str)

Upload bytes data to local file system

Args: data: Bytes data to upload remote_path: Target path in local file system

Returns: bool: Whether the upload is successful

download(remote_path: str) bytes

Download bytes data from local file system

Args: remote_path: Path of the file in local file system

Returns: bytes | None: Downloaded bytes data, None if failed

exists(remote_path: str) bool

Check if the file exists in local file system

delete(remote_path: str)

Delete a file from local file system