https://github.com/hexlet-components/python-immutable-fs-trees
https://github.com/hexlet-components/python-immutable-fs-trees
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hexlet-components/python-immutable-fs-trees
- Owner: hexlet-components
- License: isc
- Created: 2020-06-05T07:24:40.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-12-08T17:34:58.000Z (7 months ago)
- Last Synced: 2025-12-10T02:40:43.483Z (7 months ago)
- Language: Python
- Size: 35.2 KB
- Stars: 7
- Watchers: 9
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-immutable-fs-trees
[](https://github.com/hexlet-components/python-immutable-fs-trees/actions)
## Install
```shell
pip install hexlet-immutable-fs-trees
```
## Usage example
```python
import hexlet.fs as fs
fs.is_file(fs.mkfile('config')) # True
fs.is_directory(fs.mkdir('etc')) # True
tree = fs.mkdir('etc', [fs.mkfile('config'), fs.mkfile('hosts')])
children = fs.get_children(tree)
fs.get_name(children[0]) # 'config'
list(map(lambda item: fs.get_name(item), children)) # ['config', 'hosts']
```
---
[](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=python-immutable-fs-trees)
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io?utm_source=github&utm_medium=link&utm_campaign=python-immutable-fs-trees).
See most active contributors on [hexlet-friends](https://friends.hexlet.io/).