pyplugins.apis.static_fs module

class pyplugins.apis.static_fs.StaticFS[source]

Bases: Plugin

exists(path)[source]
Parameters:

path (str)

Return type:

bool

get_size(path)[source]

Returns the size of the file in bytes without opening it.

Parameters:

path (str)

Return type:

int | None

get_xattr(path, key)[source]
Parameters:
  • path (str)

  • key (str)

Return type:

bytes | None

list(path)[source]
Parameters:

path (str)

Return type:

list[str] | None

list_mode(path)[source]
Parameters:

path (str)

Return type:

Dict[str, int] | None

list_xattr(path)[source]
Parameters:

path (str)

Return type:

list[str]

open(path)[source]
Parameters:

path (str)

Return type:

IO[bytes] | None

read(path, size, offset=0)[source]
Parameters:
  • path (str)

  • size (int)

  • offset (int)

Return type:

bytes | None

statfs(path=None)[source]

Returns a dictionary with keys named like the POSIX statvfs struct. For static files, returns default values. For ratarmountcore files, delegates to the underlying mount source.

Parameters:

path (str | None)

Return type:

Dict[str, Any]

uninit()[source]

Cleanly closes the underlying MountSource and forces a disk sync.