time | calls | line |
---|
| | 163 | function pathsAreEqual = areDirectoriesEqual(path1, path2, resolveSymbolicLinks)
|
| | 164 |
|
| | 165 | % on Windows, compare normalized paths ignoring case. On other platforms,
|
| | 166 | % check whether the two normalized paths are equal.
|
| 1 | 167 | if ispc
|
| | 168 | pathsAreEqual = strcmpi(com.mathworks.util.FileUtils.normalizePathname(path1), ...
|
| | 169 | com.mathworks.util.FileUtils.normalizePathname(path2));
|
| 1 | 170 | else
|
| 1 | 171 | pathsAreEqual = isequal(com.mathworks.util.FileUtils.normalizePathname(path1), ...
|
| | 172 | com.mathworks.util.FileUtils.normalizePathname(path2));
|
| 1 | 173 | end
|
| | 174 |
|
| 1 | 175 | if resolveSymbolicLinks && ~pathsAreEqual
|
| | 176 | rfs = com.mathworks.mlwidgets.explorer.model.realfs.RealFileSystem.getInstance();
|
| | 177 | resolved1 = rfs.resolve(rfs.getEntry(com.mathworks.matlab.api.explorer.FileLocation(path1))).getLocation();
|
| | 178 | resolved2 = rfs.resolve(rfs.getEntry(com.mathworks.matlab.api.explorer.FileLocation(path2))).getLocation();
|
| | 179 | pathsAreEqual = resolved1.equals(resolved2);
|
| | 180 | end
|
| 1 | 181 | end
|
Other subfunctions in this file are not included in this listing.