mmengine.fileio¶
File Backend¶
Abstract class of storage backends. |
|
A general file client to access files in different backends. |
|
Raw hard disks storage backend. |
|
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¶
File IO¶
Dump data to json/yaml/pickle strings or files. |
|
Load data from json/yaml/pickle files. |
|
Create a symbolic link pointing to src named dst. |
|
Copy a file src to dst and return the destination file. |
|
Copy a local file src to dst and return the destination file. |
|
Copy the file src to local dst and return the destination file. |
|
Recursively copy an entire directory tree rooted at src to a directory named dst and return the destination directory. |
|
Recursively copy an entire directory tree rooted at src to a directory named dst and return the destination directory. |
|
Recursively copy an entire directory tree rooted at src to a local directory named dst and return the destination directory. |
|
Check whether a file path exists. |
|
Generate the presigned url of video stream which can be passed to mmcv.VideoReader. |
|
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. |
|
Write bytes to a given |
|
Write text to a given |
|
Remove a file. |
|
Recursively delete a directory tree. |
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. |