Table.add_files
Table.add_files(*, files=None, directory=None) → list(File)
Uploads either a list of files or all files in a directory to an index table. The index table must be on an unreleased version. Attempting to add files to a non-index table will result in an error.
Parameters:
files
: list(str) | list(dict<path=str, name=str, data=str | bytes>), default None
A list of files to upload. Either this or directory
must be specified, but not both. Can either be a list of file paths, or a list of dicts with the keys path
, name
, and/or data
.
If providing a list of dicts, each dict must specify either path
(the path to the file on disk) or data
, representing the content to upload. name
is optional if path
is specified (defaulting to the file name), but required if data
is specified.
directory
: str, default None
A directory of files to upload. Either this or files
must be specified, but not both. All files in the directory will be uploaded, including hidden files and those in any subdirectories.
Returns:
list(File)
Examples:
Last updated