File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ pip install pathschema
1111``` python
1212from pathschema import validate
1313
14- schema = ' '
14+ schema = ' YOUR SCHEMA HERE '
1515
1616path_to_validate = ' ./path'
1717
18- with open (' path/to/schema.txt ' , ' r' ) as f:
18+ with open (' path/to/schema.pathschema ' , ' r' ) as f:
1919 schema = f.read()
2020
2121result = validate(path_to_validate, schema)
2626 print (' Valid' )
2727```
2828
29+ ## Syntax
30+
2931| Symbol | Description | Example |
3032| ---------| --------------| ---------|
3133| ` / ` | Slashes at the end of the name marks this path as a folder | ` root/ ` |
4345pathschema can be used directly in the command line.
4446
4547``` bash
46- python -m pathschema path/to/schema.txt path/to/dir/to/validate
48+ python -m pathschema ./.pathschema path/to/dir/to/validate
4749```
4850
4951Argument details:
@@ -77,7 +79,7 @@ python -m unittest discover -v -s ./tests -p test_*.py
7779
7880Command line without installing
7981``` bash
80- python ./pathschema/ ./tests/experimentations/test_schema.txt ./tests/experimentations/test_directory_ok
82+ python ./pathschema/ ./tests/experimentations/test_schema.pathschema ./tests/experimentations/test_directory_ok
8183```
8284
8385# Example Schema Definition
You can’t perform that action at this time.
0 commit comments