MCPcopy Create free account
hub / github.com/vastsa/FileCodeBox / __init__

Method __init__

apps/admin/services.py:1587–1597  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

1585
1586class LocalFileClass:
1587 def __init__(self, file):
1588 self.file = file
1589 self.path = data_root / "local" / file
1590 if os.path.exists(self.path):
1591 self.ctime = time.strftime(
1592 "%Y-%m-%d %H:%M:%S", time.localtime(os.path.getctime(self.path))
1593 )
1594 self.size = os.path.getsize(self.path)
1595 else:
1596 self.ctime = None
1597 self.size = None
1598
1599 async def read(self):
1600 return open(self.path, "rb")

Callers

nothing calls this directly

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected