fsnix / doc / source / fsnix-util.rst

fsnix.util - Higher Level Tools

Module API

Directory Objects

You should not try to instantiate a directory object directly. Instead, use :func:`opendir`, :func:`opendirat`, or :func:`fdopendir`.

Directory objects are intended to mimic the API of Python file objects to a limited degree. They are context managers and support the fileno method to get the file descriptor value. Instead of supporting IO methods some simple dir listing wrappers are supported.