Filesystem¶
Methods for interacting with or reasoning about the filesystem.
- jscc.testing.filesystem.walk(top=None, excluded=('.git', '.ve', '.venv', '_static', 'build', 'fixtures'))[source]¶
Walk a directory tree, and yield tuples consistent of a file path and file name, excluding Git files and third-party files under virtual environment, static, build, and test fixture directories (by default).
- jscc.testing.filesystem.walk_json_data(patch=None, **kwargs)[source]¶
Walk a directory tree, and yield tuples consisting of a file path, file name, text content, and JSON data.
Accepts the same keyword arguments as
jscc.testing.filesystem.walk().- Parameters:
patch (function) – a method that accepts text, and returns modified text.
- jscc.testing.filesystem.walk_csv_data(**kwargs)[source]¶
Walk a directory tree, and yield tuples consisting of a file path, file name, text content, fieldnames, and rows.
Accepts the same keyword arguments as
jscc.testing.filesystem.walk().