File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 33% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#getPosixFileAttributes(java.nio.file.Path,java.nio.file.LinkOption...)
44% https://docs.oracle.com/javase/tutorial/essential/io/links.html
55arguments
6- filepath (1 ,1 ) string { mustBeFile }
6+ filepath (1 ,1 ) string
77end
88
9- if ispc
9+ if ispc || ~isfile( filepath )
1010 c = [];
1111 return
1212end
Original file line number Diff line number Diff line change 55end
66
77properties (TestParameter )
8- in_exists = {pwd, string( mfilename(" fullpath" ))+ " .m" , " not-exists" }
8+ in_exists = {pwd, mfilename(" fullpath" ) + " .m" , " not-exists" }
99ref_exists = {true , true , false }
1010% on CI matlabroot can be writable!
1111in_is_write = {pwd, " not-exists" };
@@ -357,6 +357,17 @@ function test_java_api(tc)
357357tc .verifyGreaterThanOrEqual(v , 8 )
358358end
359359
360+ function test_hard_link_count(tc )
361+
362+ fn = mfilename(" fullpath" ) + " .m" ;
363+
364+ if ispc
365+ tc .verifyEmpty(stdlib .hard_link_count(fn ))
366+ end
367+ tc .verifyGreaterThanOrEqual(stdlib .hard_link_count(fn ), 1 )
368+
369+ tc .verifyEmpty(stdlib .hard_link_count(tempname ))
370+
360371end
361372
362373end
You can’t perform that action at this time.
0 commit comments