Skip to content

unitycatalog.files

The classes of the files API.

Classes

Name Description
DirectoryEntry A file or directory in a directory.
DownloadFileResponse A file and its metadata.
GetFileMetadataResponse The metadata of a file. The response has no body.
ListDirectoryContentsResponse  

class unitycatalog.files.DirectoryEntry

A file or directory in a directory.

Attributes

  • file_size (int | None) – Size of the file, in bytes. Absent for a directory.
  • is_directory (bool) – Whether the entry is a directory.
  • last_modified (int | None) – Time at which the file was last changed, in epoch milliseconds. Absent for a directory.
  • name (str) – Name of the file or directory: the last part of its path.
  • path (str) – Absolute path of the file or directory.

class unitycatalog.files.DownloadFileResponse

A file and its metadata.

Attributes

  • content_length (int | None) – Size of the file, in bytes.
  • content_range (str | None) – For a range, the bytes that the answer holds and the size of the file, such as bytes 0-1023/4096.
  • content_type (str | None) – Media type of the file.
  • contents (bytes) – The bytes of the file.
  • last_modified (str | None) – Time at which the file was last changed, as an HTTP date.

class unitycatalog.files.GetFileMetadataResponse

The metadata of a file. The response has no body.

Attributes

  • content_length (int | None) – Size of the file, in bytes.
  • content_type (str | None) – Media type of the file.
  • last_modified (str | None) – Time at which the file was last changed, as an HTTP date.

class unitycatalog.files.ListDirectoryContentsResponse

Attributes

  • contents (list[DirectoryEntry]) – The files and directories of the directory, directories first.
  • next_page_token (str | None) – Opaque token of the next page. Absent on the last page.