anyconfig.ioinfo.detectors
¶
Provide functions to detect str, pathlib.Path, stream and IOInfo objects.
- anyconfig.ioinfo.detectors.is_path_str(obj)¶
Test if given object
obj
is a str represents a file path.- Return type:
bool
- anyconfig.ioinfo.detectors.is_path_obj(obj)¶
Test if given object
obj
is a pathlib.Path object.- Return type:
bool
- anyconfig.ioinfo.detectors.is_io_stream(obj)¶
Test if given object
obj
is a file stream, file/file-like object.- Return type:
bool
- anyconfig.ioinfo.detectors.is_ioinfo(obj)¶
Test if given object
obj
is an IOInfo namedtuple objejct.- Return type:
bool
- anyconfig.ioinfo.detectors.is_stream(obj)¶
Test if given object
obj
is an IOInfo object with stream type.- Return type:
bool