mmeval.fileio¶
mmeval.fileio
File Backend¶
Abstract class of storage backends. |
|
Raw local storage backend. |
|
HTTP and HTTPS storage bachend. |
|
Lmdb storage backend. |
|
Memcached storage backend. |
|
Petrel storage backend (for internal usage). |
Register a backend. |
File Handler¶
A base class for file handler. |
|
A Json handler that parse json data from file object. |
|
A Pickle handler that parse pickle data from file object. |
|
A Yaml handler that parse yaml data from file object. |
A decorator that register a handler for some file extensions. |
File IO¶
Load data from json/yaml/pickle files. |
|
Check whether a file path exists. |
|
Read bytes from a given |
|
Return a file backend based on the prefix of uri or backend_args. |
|
Download data from |
|
Read text from a given |
|
Check whether a file path is a directory. |
|
Check whether a file path is a file. |
|
Concatenate all file paths. |
|
Scan a directory to find the interested directories or files in arbitrary order. |
Parse File¶
Load a text file and parse the content as a dict. |
|
Load a text file and parse the content as a list of strings. |