hpcflow.sdk.core.types.AbstractFileSystem#

class hpcflow.sdk.core.types.AbstractFileSystem(*args, **kwargs)#

Bases: Protocol

Type constraints for an abstract file system.

Methods

exists

Test if a path points to a file or directory that exists.

glob

List files in a directory that match a pattern.

rename

Rename a file or directory.

rm

Delete a file or directory.

exists(path)#

Test if a path points to a file or directory that exists.

Parameters:

path (str)

Return type:

bool

glob(pattern)#

List files in a directory that match a pattern.

Parameters:

pattern (str)

Return type:

list[str]

rename(from_, to, *, recursive=False)#

Rename a file or directory.

Parameters:
Return type:

None

rm(path, *, recursive=False)#

Delete a file or directory.

Parameters:
Return type:

None