MCPcopy Create free account
hub / github.com/WasmVM/WasmVM / dt_from_entry

Function dt_from_entry

host/sysenv/sys_fs.cpp:45–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43static constexpr uint8_t WASM_DT_LNK = 10;
44
45static uint8_t dt_from_entry(const fs::directory_entry& e) {
46 std::error_code ec;
47 if(e.is_symlink(ec)) return WASM_DT_LNK;
48 if(e.is_directory(ec)) return WASM_DT_DIR;
49 if(e.is_regular_file(ec)) return WASM_DT_REG;
50 return WASM_DT_UNKNOWN;
51}
52
53// ---- Helper: write a struct stat into wasm memory --------------------------
54

Callers 1

fs_readdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected