MCPcopy
hub / github.com/xpipe-io/xpipe / MacOs

Class MacOs

app/src/main/java/io/xpipe/app/process/OsFileSystem.java:152–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 final class MacOs implements OsFileSystem {
153
154 public boolean isProbableFilePath(String s) {
155 return s.startsWith("/");
156 }
157
158 @Override
159 public String makeFileSystemCompatible(String name) {
160 // Technically the backslash is supported, but it causes all kinds of troubles, so we also exclude it
161 return name.replaceAll("[\\\\/:]", "_").replaceAll("\0", "");
162 }
163
164 @Override
165 public String getUserHomeDirectory(ShellControl pc) throws Exception {
166 return pc.view().getEnvironmentVariableOrThrow("HOME");
167 }
168
169 @Override
170 public String getFileSystemSeparator() {
171 return "/";
172 }
173
174 @Override
175 public boolean hasMultipleRoots() {
176 return false;
177 }
178 }
179}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…