File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11%% CREATE_SYMLINK create symbolic link
2- % optional: mex
32%
43% %% Inputs
54% * target: path to link to
2625 % Matlab Java doesn't recognize the optional argument omitted.
2726 % see example/Filesystem.java for this working in plain Java.
2827 % see example/javaCreateSymbolicLink.m for a non-working attempt in Matlab.
29- if stdlib .has_dotnet() && stdlib .dotnet_api() >= 6
28+ if stdlib .has_python()
29+ py .pathlib .Path(link ).symlink_to(target );
30+ ok = true ;
31+ elseif stdlib .has_dotnet() && stdlib .dotnet_api() >= 6
3032 % https://learn.microsoft.com/en-us/dotnet/api/system.io.file.createsymboliclink
3133 System .IO .File .CreateSymbolicLink(link , target );
3234 ok = true ;
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ function build_exe(context)
281281srcs{end + 1 } = [" src/read_symlink.cpp" , win , sym ];
282282end
283283
284- if (isMATLABReleaseOlderThan(" R2024b" ) && ~stdlib .has_dotnet() || stdlib .dotnet_api() < 6 ) || build_all
284+ if (isMATLABReleaseOlderThan(" R2024b" ) && ~stdlib .has_python() && ~ stdlib . has_dotnet() || stdlib .dotnet_api() < 6 ) || build_all
285285% so that we don't need to run matlab AsAdmin on Windows
286286srcs{end + 1 } = [" src/create_symlink.cpp" , win , sym ];
287287end
You can’t perform that action at this time.
0 commit comments