| 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…