SimpleStorage
Basic implementation of Storage that provides direct file system access without additional security layers. This implementation is suitable for non-sensitive data or when encryption is handled at a different level.
Key features:
Direct file system operations
UTF-8 encoding for text
Automatic directory creation
Thread-safe operations
Usage example:
val storage = SimpleStorage(JVMFileSystemProvider)
// Store configuration
storage.write(configPath, """
{
"setting1": "value1",
"setting2": "value2"
}
""".trimIndent())
// Read configuration
val config = storage.read(configPath)
Content copied to clipboard
Parameters
Path
Platform-specific path type
fs
File system provider for actual I/O operations