GenericFile
GenericFile
A class containing basic metadata about a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
str | Path
|
The path to the file. |
required |
experiment_type |
str
|
The type of experiment the file is associated with, by default "". |
''
|
Attributes:
Name | Type | Description |
---|---|---|
local_path |
Path
|
The path to the file. |
length |
int
|
The length of the file in bytes. |
sha512 |
str
|
The SHA512 hash of the file. |
date_created |
datetime
|
The date and time the file was created. |
experiment_type |
str
|
The type of experiment the file is associated with. |
Source code in magnetopy\data_files.py
as_dict()
Serializes the GenericFile object to a dictionary.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
Contains the following keys: local_path, length, date_created, sha512 |