Package shelljob :: Module fs
[hide private]
[frames] | no frames]

Module fs

source code

A collection of filesystem related commands.

Functions [hide private]
 
find(path, include_dirs=True, include_files=True, name_regex=None, not_name_regex=None, whole_name_regex=None, not_whole_name_regex=None, exclude_root=False)
Creates an iterator of files matching a variety of conditions.
source code
Variables [hide private]
  __package__ = 'shelljob'
Function Details [hide private]

find(path, include_dirs=True, include_files=True, name_regex=None, not_name_regex=None, whole_name_regex=None, not_whole_name_regex=None, exclude_root=False)

source code 

Creates an iterator of files matching a variety of conditions.

Parameters:
  • path - which path to iterate
  • include_dirs - include directories in output
  • include_files - include files in output
  • name_regex - optional regex string compared against basename of file
  • not_name_regex - if specificed only produces names not matching this regex
  • whole_name_regex - like name_regex but applies to whole path, not just basename
  • not_whole_name_regex - like not_name_regex but applies to whole path
  • exclude_root - do not include the intput 'path' itself in the output
Returns:
a generator for the matched files