MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / to_json

Method to_json

kernel/src/vfs.rs:90–103  ·  view source on GitHub ↗

Return a list of mount points as a JSON string

(&self)

Source from the content-addressed store, hash-verified

88
89 /// Return a list of mount points as a JSON string
90 pub fn to_json(&self) -> String {
91 let mounts = self.0.read();
92
93 let mut s = String::new();
94 s.push('[');
95 for mount_path in mounts.iter() {
96 s.push('"');
97 s.push_str(&mount_path.0);
98 s.push('"');
99 s.push(',');
100 }
101 s.push(']');
102 s
103 }
104
105 /// Make a copy of the internal state
106 pub fn copy(&self) -> Self {

Callers 1

sys_listmountsFunction · 0.80

Calls 3

iterMethod · 0.80
readMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected