cloud_server.db¶
Database manager classes for servers using this template.
- class cloud_server.db.FilesMetadataDatabaseManager[source]¶
Manager class for files metadata database operations.
- __init__()[source]¶
Initialize the FilesMetadataDatabaseManager with the given database configuration.
- perform_file_metadata_action(action, file_metadata=None, file_id=None)[source]¶
Perform a database action (CRUD) on file metadata.
- Return type:
- synchronize_with_storage(storage_directory)[source]¶
Synchronize the files metadata database with the actual files in the storage directory.
This method ensures that the database entries accurately reflect the files present in the storage directory. It adds metadata for new files, updates metadata for existing files, and removes metadata for deleted files.
Modules
Files metadata database manager. |