Skip to main content

stat

Function stat 

Source
pub async fn stat(__arg0: State<AppState>, __arg1: Query<PathQuery>) -> Response
Expand description

GET /api/v1/fs/stat — one entry, file or directory.

Resolving the path and reading its metadata are both blocking I/O. Same convention as list/list_blocking, download/download_blocking, and delete_file/delete_file_blocking above (src/execution/executor.rs:209-215): run it on spawn_blocking so a slow filesystem can never starve the tokio worker pool that also runs /health and the accept loop. This was, until now, the one route in this module that called resolve_existing and std::fs::metadata directly on the async runtime.