Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# FileSystem

This CDP domain is experimental.

- Types

- Commands

- Events

## Types

Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.

class File(name, last_modified, size, type_)
  name: `str`
  last_modified: `TimeSinceEpoch`

    Timestamp

  size: `float`

    Size in bytes

  type_: `str`

class Directory(name, nested_directories, nested_files)
  name: `str`
  nested_directories: `List`[`str`]
  nested_files: `List`[`File`]

    Files that are directly nested under this directory.

class BucketFileSystemLocator(storage_key, path_components, bucket_name=None)
  storage_key: `SerializedStorageKey`

    Storage key

  path_components: `List`[`str`]

    Path to the directory using each path component as an array item.

  bucket_name: `Optional`[`str`] = None

    //developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)

    Type:

      Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https

## Commands

Each command is a generator function. The return type `Generator[x, y, z]` indicates that the generator yields arguments of type `x`, it must be resumed with an argument of type `y`, and it returns type `z`. In this library, types `x` and `y` are the same for all commands, and `z` is the return type you should pay attention to. For more information, see Getting Started: Commands.

get_directory(bucket_file_system_locator)
  Parameters:

    bucket_file_system_locator (`BucketFileSystemLocator`) –

  Return type:

    `Generator`[`Dict`[`str`, `Any`], `Dict`[`str`, `Any`], `Directory`]

  Returns:

    Returns the directory object at the path.

## Events

There are no events in this module.