Expose advertised actor-served files in directory listings
This commit is contained in:
committed by
Sausage Agent
parent
d6d3c9a2f2
commit
845c961f4f
@@ -85,6 +85,13 @@ Every actor can read and write them. The host turns each file operation into a
|
||||
message from `fs` to `<id>` and waits up to 10 seconds for the reply. `path`
|
||||
is relative to `fs/` and starts with `/` (the folder itself is `/`).
|
||||
|
||||
To make this virtual directory discoverable, an actor that serves it declares
|
||||
`Actor-served files` and `fs_read` in its leading `//!` documentation in
|
||||
`source/src/main.rs`. The host uses that declaration when listing
|
||||
`/actor/<id>/`; it does not probe every actor (which could stall on actors that
|
||||
do not handle filesystem messages). This is discovery metadata only: opening
|
||||
and reading the path still requires a valid `fs_read` reply.
|
||||
|
||||
| Request | Reply |
|
||||
| --- | --- |
|
||||
| `{"type": "fs_read", "path"}` | `{"type": "fs_file", "text"}` (or `"base64"` instead of `"text"`), or `{"type": "fs_dir", "entries": [{"name", "type": "file" \| "dir"}]}` |
|
||||
|
||||
Reference in New Issue
Block a user