File tree Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 55 file (1 ,1 ) string
66end
77
8+ if stdlib .strempty(file )
9+ y = false ;
10+ return
11+ end
12+
813try
914 if stdlib .dotnet_api() >= 6
1015 y = ~isempty(System .IO .FileInfo(file ).LinkTarget);
Original file line number Diff line number Diff line change 1- function ok = is_symlink(file )
1+ function y = is_symlink(file )
2+
3+ if stdlib .strempty(file )
4+ y = false ;
5+ return
6+ end
27
38try
4- ok = java .nio .file .Files .isSymbolicLink(javaAbsolutePath(file ));
9+ y = java .nio .file .Files .isSymbolicLink(javaAbsolutePath(file ));
510catch e
611 javaException(e )
7- ok = logical .empty ;
12+ y = logical .empty ;
813end
914
1015end
Original file line number Diff line number Diff line change 11function y = is_symlink(file )
22
3+ if stdlib .strempty(file )
4+ y = false ;
5+ return
6+ end
7+
38try
49 y = py .pathlib .Path(file ).is_symlink();
510catch
Original file line number Diff line number Diff line change 1- function [ok , cmd ] = is_symlink(file )
1+ function [y , cmd ] = is_symlink(file )
2+
3+ if stdlib .strempty(file )
4+ y = false ;
5+ return
6+ end
27
38if ispc()
49 cmd = sprintf(' fsutil reparsepoint query "%s "' , file );
914end
1015
1116[s , ~ ] = system(cmd );
12- ok = s == 0 ;
17+ y = s == 0 ;
1318
1419end
You can’t perform that action at this time.
0 commit comments