mountos-native 0.4.0

Rust client for the mountOS native filesystem API. Talk to a mounted mountOS volume (a POSIX filesystem over S3, Azure Blob or Google Cloud Storage) over a local Unix socket, without FUSE.
Documentation
//! Protobuf messages for package mountos.filesystem.v1, generated by build.rs
//! from api/proto/mountos_fs.proto. Method IDs and result types come from
//! the generated ops_gen module, open flags are constants from api/filesystem.yaml.

include!(concat!(env!("OUT_DIR"), "/mountos.filesystem.v1.rs"));

pub use crate::ops_gen::{method, StatfsInfo};

/// Open flags. The low two bits are the access mode, 3 is invalid.
pub mod open_flag {
  pub const READ_ONLY: u32 = 0;
  pub const WRITE_ONLY: u32 = 1;
  pub const READ_WRITE: u32 = 2;
  pub const CREATE: u32 = 64;
  pub const EXCL: u32 = 128;
  pub const TRUNC: u32 = 512;
  pub const APPEND: u32 = 1024;
}

impl Range {
  /// A byte range of `length` bytes from `offset`, for `File::read_batch`.
  pub fn new(offset: i64, length: u32) -> Range {
    Range { offset, length }
  }
}