We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e663bcd commit 36bc897Copy full SHA for 36bc897
+stdlib/+fileio/read_symlink.m
@@ -4,17 +4,23 @@
4
p (1,1) string
5
end
6
7
-import java.io.File
8
-import java.nio.file.Files
9
-
10
r = string.empty;
11
12
-if ~stdlib.fileio.is_symlink(p) || ~stdlib.fileio.exists(p), return, end
+if isMATLABReleaseOlderThan("R2024b")
+
+if ~stdlib.fileio.is_symlink(p) || ~stdlib.fileio.exists(p)
+ return
13
+end
14
15
r = stdlib.fileio.absolute_path(p);
16
17
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#readSymbolicLink(java.nio.file.Path)
18
% must be absolute path
-r = Files.readSymbolicLink(File(r).toPath());
19
+r = java.nio.file.Files.readSymbolicLink(java.io.File(r).toPath());
20
21
+else
22
+ [ok, t] = isSymbolicLink(p);
23
+ if ok
24
+ r = t;
25
+ end
26
0 commit comments