File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 77 link (1 ,1 ) string
88end
99
10+ if isMATLABReleaseOlderThan(" R2024b" )
1011% import java.io.File
1112% import java.nio.file.Files
1213% ok = Files.createSymbolicLink(File(link).toPath(), File(target).toPath());
1819end
1920
2021if ispc
21- cmd = " pwsh -c " + ' "' + " New-Item -ItemType SymbolicLink -Path " + link + " -Target " + target + ' "' ;
22+ cmd = " pwsh -c " + ' "' + " New-Item -ItemType SymbolicLink -Path " + link + ...
23+ " -Target " + target + ' "' ;
2224else
2325 cmd = " ln -s " + target + " " + link ;
2426end
2830
2931ok = stat == 0 ;
3032
33+ else
34+
35+ try
36+ createSymbolicLink(link , target );
37+ ok = true ;
38+ catch
39+ ok = false ;
40+ end
41+
42+ end
43+
3144end
Original file line number Diff line number Diff line change 66 p (1 ,1 ) string
77end
88
9- import java . io . File
10- import java . nio . file . Files
11-
12- % must be absolute path
13- f = File( stdlib . fileio .absolute_path( p )).toPath( );
14- ok = Files .isSymbolicLink( f );
9+ if isMATLABReleaseOlderThan( " R2024b " )
10+ % must be absolute path
11+ ok = java . nio . file . Files .isSymbolicLink( java . io .File( stdlib . fileio .absolute_path( p )).toPath());
12+ else
13+ ok = isSymbolicLink( p );
14+ end
1515
1616end
You can’t perform that action at this time.
0 commit comments