Source code for hpsspy.os.path

# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
hpsspy.os.path
~~~~~~~~~~~~~~

Reproduces some features of the Python built-in :mod:`os.path`.
"""


[docs]def isdir(path): """Reproduces the behavior of :func:`os.path.isdir` for HPSS files. Parameters ---------- path : :class:`str` Path to the file. Returns ------- :class:`bool` ``True`` if `path` is a directory. """ from ._os import stat return stat(path).isdir
[docs]def isfile(path): """Reproduces the behavior of :func:`os.path.isfile` for HPSS files. Parameters ---------- path : :class:`str` Path to the file. Returns ------- :class:`bool` ``True`` if `path` is a file. """ from ._os import stat return not stat(path).isdir