syntax = "proto3"; package virtualfs; message PathRequest { string path = 1; } message AttrResponse { uint64 size = 1; uint32 mode = 2; // Permissions and file type uint64 mtime = 3; // Modification time // ... other standard stat attributes } message DirEntry { string name = 1; uint32 type = 2; // File or Directory, mapping roughly to libc::DT_REG, libc::DT_DIR, etc. } message ReadRequest { string path = 1; uint64 offset = 2; uint32 size = 3; // Optional requested chunk size. If 0, the server uses its default chunk size. uint32 chunk_size = 4; } message FileChunk { bytes data = 1; } service RemoteFileSystem { // Get file or directory attributes (size, permissions, timestamps). Maps to stat/getattr. rpc GetAttr (PathRequest) returns (AttrResponse); // List directory contents. Uses Server Streaming to handle massively large directories efficiently. rpc ReadDir (PathRequest) returns (stream DirEntry); // Read chunks of a file. Uses Server Streaming for efficient chunk delivery based on offset/size. rpc ReadFile (ReadRequest) returns (stream FileChunk); }