Releases: Lightbridge-KS/pyrfs
Releases · Lightbridge-KS/pyrfs
pyrfs v0.1.0
Initial release — a Pythonic port of the UX of R's
fs package.
Added
- Path algebra (
path_*, no I/O):path()withext=,path_dir/
path_file/path_ext*,path_rel,path_common,path_filter
(glob/regexp, mutually exclusive),path_split/path_join,
path_has_parent,path_sanitize,path_expand/path_home/path_temp,
path_tidy. FsPath— a tidy path that subclassesstr:/join operator,
chainable methods delegating to the engine,LS_COLORS-coloured repr
(degrades on non-TTY /NO_COLOR),as_pathlib()escape hatch.- Typed scalars:
Bytes ⊂ int(parses"10MB", displays444.5K,
compares against literals, arithmetic stays typed — all units 1024-based)
andPerms ⊂ int(octal/symbolic/rw-r--r--forms, mode algebra). - File operations (
file_*): create/touch/copy/move/delete/exists/
access/size/chmod/chown/show/info — mutating verbs return the new path;
overwrite=FalseraisesFileExistsError; copy/move into an existing
directory targetsdir/basename; symbolic chmod applies to the current
mode. - Directory operations (
dir_*): create/copy/delete/exists, lazy
dir_walkgenerator with the full fs filter set (all,
recurse: bool | int,type,glob/regexp,invert,
fail=False→ warn-and-skip),dir_ls,dir_map,dir_info, and a
box-drawing, coloureddir_tree. Nodir_moveby design — use
file_move. - Link operations (
link_*): symbolic (default) and hard creation,
link_path,link_exists,link_copy,link_delete(refuses
non-links). - Predicates & ids:
is_file/is_dir/is_link(lstat semantics — a
symlink is onlyis_link),is_file_empty,is_dir_empty,
is_absolute_path;user_ids/group_ids(POSIX). - Vectorization: every path-taking function is polymorphic over a
scalar, list/tuple/set, or pandas Series (without the engine importing
pandas). - pandas layer (optional
[pandas]extra):bytes/perms/path
ExtensionDtypes lifting the scalar semantics onto columns
(size > "10KB"works in.query()), theSeries.fsaccessor, and
file_info/dir_inforeturning typed DataFrames (engine rows without
pandas). - Temp helpers:
file_tempwith a deterministicfile_temp_push/pop
stack for reproducible docs and tests. - Errors: native
OSErrorsubclasses for OS failures;FsError/
FsValueErrorfor pyrfs-level validation. - Docs: MkDocs Material site at https://pyrfs.netlify.app with
llms.txt/llms-full.txt, an executed tour notebook, and a Quarto-rendered
README kept fresh by CI.