Sample CLI
gway resource
References
Signature
(*parts, touch=False, check=False, text=False, dir=False)
Docstring
Locate or create a resource by searching in:
1. Current working directory
2. GWAY_ROOT environment variable
3. User home directory
If not found, returns the path in the CWD (which may not exist) unless check=True, in which case aborts.
Arguments:
- touch: if True, create the file (and parents) if it does not exist.
- dir: if True, create the final path as a directory, not a file.
- text: if True, return file contents as text, not a Path.
- check: if True, abort if resource does not exist.
TODOs
# TODO: Consider if we should also be compatible with BASE_PATH and GWAY_PATH
# 2. GWAY_ROOT env