File System Tree
Project description
python-immutable-fs-trees
Install
pip install hexlet-immutable-fs-trees
Usage example
>>> 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']
>>>
This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet (in Russian).
See most active contributers on hexlet-friends.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hexlet-immutable-fs-trees-0.1.8.tar.gz
.
File metadata
- Download URL: hexlet-immutable-fs-trees-0.1.8.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.7 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 250159064cf2ce3e7da4a8dbe8527ccdef1ebd63c9a6f9e66606736d4dc40dc0 |
|
MD5 | 436393bdaf2c87a66f448d9a769789a5 |
|
BLAKE2b-256 | 8e9912436dff85089e50cbba2f499e011ecb0bdb253bfc8104665b4f3811704e |
File details
Details for the file hexlet_immutable_fs_trees-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: hexlet_immutable_fs_trees-0.1.8-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.7 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a4d8afc2c2d17406c0f036fd9ffe200a4c0099bad74acfca74682169d4ca1d7 |
|
MD5 | 7db381e01258cff7e784e24998ef65ea |
|
BLAKE2b-256 | 268c955b9d29b394515a8552ed2b46bb53c814deeff0a917e6566b7e7550b02c |