File tree Expand file tree Collapse file tree 4 files changed +7
-13
lines changed
Expand file tree Collapse file tree 4 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1919 expand_tilde (1 ,1 ) logical = true
2020end
2121
22- import java .io .File
23-
2422if expand_tilde
2523 c = stdlib .expanduser(p );
2624else
4846% REQUIRES path to exist, while java method does not.
4947% c = builtin('_canonicalizepath', c);
5048
51- c = stdlib .posix(File(c ).getCanonicalPath());
49+ c = stdlib .posix(java . io . File(c ).getCanonicalPath());
5250
5351end % function
Original file line number Diff line number Diff line change 33 p (1 ,1 ) string
44end
55
6- import java .io .File
7- import java .nio .file .Files
8-
9- t = string(Files .getFileStore(File(p ).toPath()).type());
6+ t = string(java .nio .file .Files .getFileStore(java .io .File(p ).toPath()).type());
107
118end
Original file line number Diff line number Diff line change 3636 Val = strtok(Val , " #" ); % remove inline comment
3737 Val = strtrim(Val ); % remove spaces before comment
3838
39- [ val , status ] = double(string(Val ));
40- if status , Val = val ; end % convert string to number(s)
39+ Val = double(string(Val ));
40+ % convert string to number(s)
4141 end
4242
4343 if ~exist(' Section' , ' var' ) % No section found before
Original file line number Diff line number Diff line change 1212 path2 (1 ,1 ) string
1313end
1414
15- import java .io .File
16- import java .nio .file .Files
17-
1815issame = false ;
1916if ~stdlib .exists(path1 ) || ~stdlib .exists(path2 )
2017 return
2421path1 = stdlib .canonical(path1 );
2522path2 = stdlib .canonical(path2 );
2623
27- issame = Files .isSameFile(File(path1 ).toPath(), File(path2 ).toPath());
24+ issame = java .nio .file .Files .isSameFile(...
25+ java .io .File(path1 ).toPath(), ...
26+ java .io .File(path2 ).toPath());
2827
2928% alternative, lower-level method is lexical only (not suitable for us):
3029% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#equals(java.lang.Object)
You can’t perform that action at this time.
0 commit comments