Skip to main content

Module data_storage

Module data_storage 

Source
Expand description

Cross-platform data storage path management for application files.

Provides a unified interface for managing application data storage locations across different operating systems following OS conventions.

§Features

  • Platform Support: Windows LocalAppData, macOS Application Support, Linux XDG
  • Automatic Directory Creation: Creates required directories on first access
  • Permission Handling: Uses locations where users have write permissions
  • Environment Variable Support: Respects custom environment overrides
  • Fallback Strategy: Uses current directory if standard locations fail

§Usage

use kasl::libs::data_storage::DataStorage;

let storage = DataStorage::new();
let db_path = storage.get_path("kasl.db")?;
let config_path = storage.get_path("config.json")?;

Structs§

DataStorage
Cross-platform data storage path manager.

Constants§

APP_METADATA_ENCRYPTION_IV
APP_METADATA_ENCRYPTION_KEY
APP_METADATA_NAME
APP_METADATA_OWNER
APP_METADATA_VERSION