Filesystem observation primitives for reliable Softadastra products.
softadastra/fs provides the filesystem layer of the Softadastra C++ stack.
Softadastra builds reliability-first products for local-first, offline-first, and distributed applications. This module turns filesystem state into deterministic snapshots and structured change events.
softadastra/fs exists to observe files safely and consistently.
It is used by higher-level modules such as WAL, Store, Sync, Metadata, SDKs, and product infrastructure.
It is designed to be:
- Portable
- Deterministic
- Event-oriented
- Snapshot-based
- Product-ready
This module provides filesystem primitives such as:
- Path normalization
- Directory scanning
- Filesystem snapshots
- Snapshot diffing
- File state modeling
- Structured file events
- Filesystem watchers
- Event batches
softadastra/fs does not contain:
- Sync decisions
- Conflict resolution
- Storage engines
- Network transport
- Product-specific logic
It observes filesystem changes, but it does not decide how those changes should be synchronized or stored.
Filesystem
|
Scanner / Watcher
|
Snapshot
|
Diff
|
File eventsSoftadastra treats the filesystem as a source of structured events.
Instead of trusting raw OS events directly, the module can scan, compare snapshots, and produce deterministic changes.
Softadastra products
|
SDKs and product APIs
|
Sync, WAL, Store, Metadata
|
softadastra/fs
|
softadastra/coresoftadastra/fs depends on softadastra/core and provides filesystem observation for higher-level modules.
vix add @softadastra/fs#include <softadastra/fs/Fs.hpp>#include <softadastra/fs/Fs.hpp>
#include <iostream>
int main()
{
auto root = softadastra::fs::path::Path::from("./data");
if (!root)
{
std::cout << "invalid path\n";
return 1;
}
auto snapshot = softadastra::fs::scanner::Scanner::scan(root.value());
if (!snapshot)
{
std::cout << "scan failed\n";
return 1;
}
for (const auto& [_, file] : snapshot.value().all())
{
std::cout << file.path.str() << "\n";
}
return 0;
}- C++20
softadastra/core- Platform filesystem APIs when watcher backends are enabled
For the full documentation, visit docs.softadastra.com.
Licensed under the Apache License, Version 2.0.