jammy.io package¶
Submodules¶
jammy.io.common module¶
jammy.io.fs module¶
jammy.io.path module¶
- jammy.io.path.glob(path, glob_mask='**/*', regex='', inverse=False, ftype='fd')[source]¶
glob files under path
path: targeted search path glob_mask: simple glob pattern, use “*” when only scan current folder regex: re inverse: return not match if True ftype: “f” for file and “d” for dir
- Example:
>>> glob("ckpt", regex="ckpt-[0-9]{4}\.pth", ftype="f") >>> ["ckpt/ckpt-0000.pth", "ckpt/ckpt-0001.pth", "ckpt/unet/ckpt-0001.pth"] >>> glob("ckpt", regex="ckpt-[0-9]{4}", ftype="d") >>> ["ckpt/ckpt-0000/", "ckpt/unet/ckpt-0000/"]