snakeoil.osutils.native_readdir module¶
Wrapper for readdir which grabs file type from d_type.
- snakeoil.osutils.native_readdir.listdir_dirs(path, followSymlinks=True)[source]¶
Return a list of all subdirectories within a directory
- Parameters:
path – directory to scan
followSymlinks – this controls if symlinks are resolved. If True and the symlink resolves to a directory, it is returned, else if False it isn’t returned.
- Returns:
list of directories within path
- snakeoil.osutils.native_readdir.listdir_files(path, followSymlinks=True)[source]¶
Return a list of all files within a directory
- Parameters:
path – directory to scan
followSymlinks – this controls if symlinks are resolved. If True and the symlink resolves to a file, it is returned, else if False it isn’t returned.
- Returns:
list of files within path