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 19
19
expand_tilde (1 ,1 ) logical = true
20
20
end
21
21
22
- import java .io .File
23
-
24
22
if expand_tilde
25
23
c = stdlib .expanduser(p );
26
24
else
48
46
% REQUIRES path to exist, while java method does not.
49
47
% c = builtin('_canonicalizepath', c);
50
48
51
- c = stdlib .posix(File(c ).getCanonicalPath());
49
+ c = stdlib .posix(java . io . File(c ).getCanonicalPath());
52
50
53
51
end % function
Original file line number Diff line number Diff line change 3
3
p (1 ,1 ) string
4
4
end
5
5
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());
10
7
11
8
end
Original file line number Diff line number Diff line change 36
36
Val = strtok(Val , " #" ); % remove inline comment
37
37
Val = strtrim(Val ); % remove spaces before comment
38
38
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)
41
41
end
42
42
43
43
if ~exist(' Section' , ' var' ) % No section found before
Original file line number Diff line number Diff line change 12
12
path2 (1 ,1 ) string
13
13
end
14
14
15
- import java .io .File
16
- import java .nio .file .Files
17
-
18
15
issame = false ;
19
16
if ~stdlib .exists(path1 ) || ~stdlib .exists(path2 )
20
17
return
24
21
path1 = stdlib .canonical(path1 );
25
22
path2 = stdlib .canonical(path2 );
26
23
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());
28
27
29
28
% alternative, lower-level method is lexical only (not suitable for us):
30
29
% 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