Folder
- class canvasapi.folder.Folder(requester, attributes)
- Parameters:
requester (
canvasapi.requester.Requester) – The requester to pass HTTP requests through.attributes (dict) – The JSON object to build this object with.
- copy_file(source_file, **kwargs)
Copies a file into the current folder.
- Calls:
- Parameters:
source_file (int or
canvasapi.file.File) – The object or id of the source file.- Return type:
- create_folder(name, **kwargs)
Creates a folder within this folder.
- Calls:
- Parameters:
name (str) – The name of the folder.
- Return type:
- delete(**kwargs)
- Remove this folder. You can only delete empty folders unless you set the
‘force’ flag.
- Calls:
- Return type:
- get_files(**kwargs)
Returns the paginated list of files for the folder.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.file.File
- get_folders(**kwargs)
Returns the paginated list of folders in the folder.
- Calls:
- Return type:
canvasapi.paginated_list.PaginatedListofcanvasapi.folder.Folder
- update(**kwargs)
Updates a folder.
- Calls:
- Return type:
- upload(file: PathLike | str | IOBase | FileIO, **kwargs)
Upload a file to this folder.
- Calls:
- Parameters:
file (file or str) – The file or path of the file to upload.
- Returns:
True if the file uploaded successfully, False otherwise, and the JSON response from the API.
- Return type:
tuple