class documentation

class FileLFSClient(LFSClient):

Constructor: FileLFSClient(url, config)

View In Hierarchy

LFS client for file:// URLs that accesses local filesystem.

Method __init__ Initialize File LFS client.
Method download Download an LFS object from local filesystem.
Method upload Upload an LFS object to local filesystem.
Instance Variable _local_store Undocumented

Inherited from LFSClient:

Class Method from_config Create LFS client from git config.
Class Method from_url Create appropriate LFS client based on URL scheme.
Instance Variable config Undocumented
Property url Get the LFS server URL without trailing slash.
Instance Variable _base_url Undocumented
def __init__(self, url: str, config: Config | None = None):

Initialize File LFS client.

Parameters
url:strLFS server URL (file://)
config:Config | NoneOptional git config (unused for file:// URLs)
def download(self, oid: str, size: int, ref: str | None = None) -> bytes:

Download an LFS object from local filesystem.

Parameters
oid:strObject ID (SHA256)
size:intExpected size
ref:str | NoneOptional ref name (ignored for file:// URLs)
Returns
bytesObject content
Raises
LFSErrorIf object not found or size mismatch
def upload(self, oid: str, size: int, content: bytes, ref: str | None = None):

Upload an LFS object to local filesystem.

Parameters
oid:strObject ID (SHA256)
size:intObject size
content:bytesObject content
ref:str | NoneOptional ref name (ignored for file:// URLs)
Raises
LFSErrorIf size or OID mismatch
_local_store =

Undocumented