File tree Expand file tree Collapse file tree 4 files changed +14
-22
lines changed Expand file tree Collapse file tree 4 files changed +14
-22
lines changed Original file line number Diff line number Diff line change 99
1010i = [];
1111
12- if stdlib .exists(path )
13- if stdlib .isoctave()
14- [s , err ] = stat(path );
15- if err == 0
16- i = s .dev ;
17- end
18- elseif stdlib .has_java() && stdlib .java_api() >= 11
19- % Java 1.8 is buggy in some corner cases, so we require at least 11.
20- i = java .nio .file .Files .getAttribute(javaPathObject(path ), " unix:dev" , javaLinkOption());
12+ if stdlib .isoctave()
13+ [s , err ] = stat(path );
14+ if err == 0
15+ i = s .dev ;
2116 end
17+ elseif isunix() && stdlib .has_java() && stdlib .java_api() >= 11
18+ % Java 1.8 is buggy in some corner cases, so we require at least 11.
19+ i = java .nio .file .Files .getAttribute(javaPathObject(path ), " unix:dev" , javaLinkOption());
2220end
2321
2422end
Original file line number Diff line number Diff line change 1111 p {mustBeTextScalar } = ' '
1212end
1313
14- assert(stdlib .exists(p ), " Path does not exist: %s" , p );
15-
1614op = javaPathObject(p );
1715
1816if stdlib .isoctave()
Original file line number Diff line number Diff line change 1313% https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/nio/file/Files.html#getOwner(java.nio.file.Path,java.nio.file.LinkOption...)
1414% https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/nio/file/LinkOption.html
1515
16- assert(stdlib .exists(p ), " Path %s does not exist." , p )
17-
1816op = javaPathObject(p );
1917opt = javaLinkOption();
2018
Original file line number Diff line number Diff line change 99
1010i = [];
1111
12- if stdlib .exists(path )
13- if stdlib .isoctave()
14- [s , err ] = stat(path );
15- if err == 0
16- i = s .ino ;
17- end
18- elseif stdlib .has_java() && stdlib .java_api() >= 11
19- % Java 1.8 is buggy in some corner cases, so we require at least 11.
20- i = java .nio .file .Files .getAttribute(javaPathObject(path ), " unix:ino" , javaLinkOption());
12+ if stdlib .isoctave()
13+ [s , err ] = stat(path );
14+ if err == 0
15+ i = s .ino ;
2116 end
17+ elseif isunix() && stdlib .has_java() && stdlib .java_api() >= 11
18+ % Java 1.8 is buggy in some corner cases, so we require at least 11.
19+ i = java .nio .file .Files .getAttribute(javaPathObject(path ), " unix:ino" , javaLinkOption());
2220end
2321
2422end
You can’t perform that action at this time.
0 commit comments