ensure_readable_fileobj#
- tollan.utils.file.ensure_readable_fileobj(arg, *args, **kwargs)[source]#
Return a readable object.
This differs from the
astropy.utils.data.get_readable_fileobjin that it is no-op ifargis already readable.- Parameters:
arg (str | PathLike | readable object) – File path or object with read() method
*args – Additional arguments passed to get_readable_fileobj
**kwargs – Keyword arguments passed to get_readable_fileobj