pip install hexlet-immutable-fs-trees
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.
See most active contributors on hexlet-friends.