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 85306ca commit bdb14abCopy full SHA for bdb14ab
+stdlib/get_permissions.m
@@ -13,20 +13,20 @@
13
file (1,1) string
14
end
15
16
-perm = '';
17
-b = '';
18
19
-if stdlib.exists(file)
20
- try
21
- perm = perm2char(filePermissions(file));
22
- b = 'native';
23
- catch e
24
- if e.identifier ~= "MATLAB:UndefinedFunction"
+try
+ perm = perm2char(filePermissions(file));
+ b = 'native';
+catch e
+ switch e.identifier
+ case 'MATLAB:UndefinedFunction'
+ perm = perm2char(stdlib.legacy.file_attributes(file));
+ b = 'legacy';
25
+ case 'MATLAB:io:filesystem:filePermissions:CannotFindLocation'
26
+ perm = '';
27
+ b = '';
28
+ otherwise
29
rethrow(e)
- end
-
- perm = perm2char(stdlib.legacy.file_attributes(file));
- b = 'legacy';
30
31
32
0 commit comments