Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/littlefs/lfs.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ cdef extern from "lfs.h":
lfs_size_t file_max
lfs_size_t attr_max
lfs_size_t metadata_max
lfs_size_t inline_max
uint32_t disk_version

int lfs_mount(lfs_t *lfs, const lfs_config *config)
Expand Down
5 changes: 5 additions & 0 deletions src/littlefs/lfs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class LFSConfig:
file_max: int = 0,
attr_max: int = 0,
metadata_max: int = 0,
inline_max: int = 0,
disk_version: int = 0,
) -> None: ...
@property
Expand All @@ -65,6 +66,10 @@ class LFSConfig:
def file_max(self) -> int: ...
@property
def attr_max(self) -> int: ...
@property
def metadata_max(self) -> int: ...
@property
def inline_max(self) -> int: ...

class LFSFilesystem:
@property
Expand Down
8 changes: 8 additions & 0 deletions src/littlefs/lfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ cdef class LFSConfig:
file_max: int = 0,
attr_max: int = 0,
metadata_max: int = 0,
inline_max: int = 0,
disk_version: int = 0,
):
"""LittleFS Configuration.
Expand Down Expand Up @@ -149,6 +150,7 @@ cdef class LFSConfig:
file_max: int
attr_max: int
metadata_max: int
inline_max: int
disk_version: int
"""

Expand All @@ -171,6 +173,7 @@ cdef class LFSConfig:
self._impl.file_max = file_max
self._impl.attr_max = attr_max
self._impl.metadata_max = metadata_max
self._impl.inline_max = inline_max
self._impl.disk_version = disk_version

if context is None:
Expand All @@ -193,6 +196,7 @@ cdef class LFSConfig:
f"file_max={self._impl.file_max}",
f"attr_max={self._impl.attr_max}",
f"metadata_max={self._impl.metadata_max}",
f"inline_max={self._impl.inline_max}",
f"disk_version={self._impl.disk_version}"
)
return f"{self.__class__.__name__}({', '.join(args)})"
Expand Down Expand Up @@ -237,6 +241,10 @@ cdef class LFSConfig:
def metadata_max(self):
return self._impl.metadata_max

@property
def inline_max(self):
return self._impl.inline_max

@property
def disk_version(self):
return self._impl.disk_version
Expand Down
Loading