swh.fuse.fuse module#
- class swh.fuse.fuse.Fuse(cache: FuseCache, conf: Dict[str, Any], graph_backend: GraphBackend, obj_backend: ObjBackend)[source]#
Bases:
Operations
Software Heritage Filesystem in Userspace (FUSE).
Locally mount parts of the archive and navigate it as a virtual file system.
This class ties together
pyfuse3
and the configured cache and back-end.- async get_metadata(swhid: CoreSWHID) Any [source]#
Retrieve metadata for a given SWHID using Software Heritage API
- async get_blob(swhid: CoreSWHID) bytes [source]#
Retrieve the blob bytes for a given content SWHID using Software Heritage API
- async get_history(swhid: CoreSWHID) List[CoreSWHID] [source]#
Retrieve a revision’s history using Software Heritage Graph API
- async get_visits(url_encoded: str) List[Dict[str, Any]] [source]#
Retrieve origin visits given an encoded-URL using Software Heritage API
- async getattr(inode: InodeT, _ctx: RequestContext) EntryAttributes [source]#
Get attributes for a given inode
- async opendir(inode: InodeT, _ctx: RequestContext) FileHandleT [source]#
Open a directory referred by a given inode
- async readdir(fh: FileHandleT, offset: int, token: ReaddirToken) None [source]#
Read entries in an open directory
- async open(inode: InodeT, _flags: int, _ctx: RequestContext) FileInfo [source]#
Open an inode and return a unique file handle
- async read(fh: FileHandleT, offset: int, length: int) bytes [source]#
Read length bytes from file handle fh at position offset
- async lookup(parent_inode: InodeT, name: FileNameT, _ctx: RequestContext) EntryAttributes [source]#
Look up a directory entry by name and get its attributes