fsdb_check
plantdb.commons.cli.fsdb_check Link
backup_file Link
backup_file(file)
Backup a file by creating a timestamped copy.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
str or Path
|
The path to the file to backup. |
required |
Source code in plantdb/commons/cli/fsdb_check.py
59 60 61 62 63 64 65 66 67 68 69 |
|
backup_filename Link
backup_filename(file)
Create a backup a filename by adding a timestamp.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
str or Path
|
The path to the file to backup. |
required |
Examples:
>>> backup_filename("test/file.json")
PosixPath('test/file_230601_105815.json')
Source code in plantdb/commons/cli/fsdb_check.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
same_jsons Link
same_jsons(file_a, file_b)
Test if two JSON files have the same content.
Source code in plantdb/commons/cli/fsdb_check.py
78 79 80 81 82 83 84 85 |
|