Skip to main content
=========
FS-Hopper
=========

FS-Hopper is a simplistic and very thin abstraction layer for
accessing a filesystem directory tree in an object-oriented style.
The only two known filesystem nodes are directories and trees. Both
are implemented as new-style classes. Each method call to them (e.g.
DirectoryNode.get_childs()) will return instances of either
DirectoryNode or FileNode, allowing easy traversal throughout the
tree.

Additionally, you can define a set_root, similar to (but not really)
GNU/chroot. It is prohibited to create Nodes above set_root making it
easy for you to jail your code into a certain directory within the
filesystem.

=====
Usage
=====

Jail code into /tmp and create a working directory:

#!/usr/bin/env python2

import fs_hopper
fs_hopper.set_root('/tmp')

workdir = fs_hopper.Directory('/tmp/fs_hopper')
workdir.mkdir()
print workdir

Recursively get all configuration files of some_app

#!/usr/bin/env python2

import os
import fs_hopper

name = os.path.expanduser('~/.config/some_app')
confdir = fs_hopper.Directory(name)
confs = confdir.get_subs('*.conf')
print confs

Read /etc/passwd

#!/usr/bin/env python2

import fs_hopper

passwd = fs_hopper.File('/etc/passwd')
print passwd.get_content()

=========
Resources
=========

- Github: https://gihub.com/baccenfutter/fs_hopper/
- PyPi : https://pypi.python.org/pypi/FS-Hopper/

Release files for FS-Hopper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FS-Hopper 0.1.1
File Size Uploaded
FS-Hopper-0.1.1.tar.gz 3.4 kB Details

Release files / FS-Hopper-0.1.1.tar.gz

Download URL FS-Hopper-0.1.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e79b9cf9f06cdd0162bcd0fd39f00fdbdd5eec0b750b322679f3920d8151d633
BLAKE2b-256 checksum
How to use checksums
6e4fb610e2e70d1215cee6cb4492f91fd5c3b350297795b636e044edd29f4099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page