Files
Utility classes for handling local and remote files.
File
dcase_util.files.File
Generic file class.
|
Generic file class |
|
Load file |
|
Save file |
Get file information, filename |
|
|
Detect file format from extension |
Validate file format |
|
Checks that file exists |
|
Check if file is empty |
|
|
Use csv.sniffer to guess delimiter for CSV file |
|
Determine if the file is compressed package. |
Package
dcase_util.files.Package
Generic package class.
|
Generic package class |
|
Extract the package. |
|
Compress the package. |
|
Detect file format from extension |
Validate file format |
|
Checks that file exists |
FileLock
dcase_util.files.FileLock
Simple file-based locking class.
|
Simple file-based locking class. |
Lock file. |
|
Release file lock. |
|
Check is the locking file older than specified timeout. |
|
Check does the locking file exists. |
|
Create locking file with current time stamp. |
RemoteFile
dcase_util.files.RemoteFile
Remote file handling class.
|
Remote file class |
Download remote file and save it as local file. |
|
|
Check that file contains given type of content |
Checksum for local file. |
|
Modification timestamp for local file. |
|
File size of local file in bytes. |
|
File size of local file in human readable form. |
|
Check does the local file exists. |
|
Check does the local file corresponds to remote file (based on checksum or modification times and file size). |
|
URL to remote file |
|
Last modification time for remote file. |
|
File size of remote file. |
|
Status of remote file. |
|
File size of remote file in human readable form. |
|
Get information about the remove file (status, size, checksum, last modification time). |
|
Check does the remote file exists (based on HTTP status code). |
RemotePackage
dcase_util.files.RemotePackage
Remote package handling class.
|
Remote package class |
Download remote file and save it as local file. |
|
|
Extract the package. |
Package password |
|
|
Check that file contains given type of content |
Checksum for local file. |
|
Modification timestamp for local file. |
|
File size of local file in bytes. |
|
File size of local file in human readable form. |
|
Check does the local file exists. |
|
Check does the local file corresponds to remote file (based on checksum or modification times and file size). |
|
URL to remote file |
|
Last modification time for remote file. |
|
File size of remote file. |
|
Status of remote file. |
|
File size of remote file in human readable form. |
|
Get information about the remove file (status, size, checksum, last modification time). |
|
Check does the remote file exists (based on HTTP status code). |
Serializer
dcase_utils.files.Serializer
Data serialization class.
Data serialization class |
|
|
Load YAML file |
|
Load CPICKLE file |
|
Load JSON file |
|
Load MSGPACK file |
|
Load MARSHAL file |
|
Save data into YAML file |
|
Save data into CPICKLE file |
|
Save data into JSON file |
|
Save data into MSGPACK file |
|
Save data into MARSHAL file |