File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 22
33function ok = touch(file )
44
5- ok = stdlib .exists(file );
6-
7- if ~ok
8- fid = fopen(file , " w" );
9- ok = fid > 0 && fclose(fid ) == 0 ;
10- end
5+ fid = fopen(file , ' a' );
6+ ok = fid > 0 && fclose(fid ) == 0 ;
117
128if ok
13- ok = stdlib .set_modtime(file , datetime(" now" ));
9+ ok = stdlib .set_modtime(file , datetime(' now' ));
1410end
1511
1612end
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function test_is_mount(tc, B_ps)
8989
9090
9191function test_hard_link_count(tc , B_jps )
92- fn = " test_hard_link_count.txt" ;
92+ fn = ' test_hard_link_count.txt' ;
9393tc .assertTrue(stdlib .touch(fn ))
9494
9595[i , b ] = stdlib .hard_link_count(fn , B_jps );
@@ -136,7 +136,7 @@ function test_is_dev_drive(tc, B_ps)
136136function test_remove_file(tc )
137137tc .assumeFalse(stdlib .matlabOlderThan(' R2018a' ), ' test shaky on Matlab < R2018a' )
138138
139- f = " test_remove.tmp" ;
139+ f = ' test_remove.tmp' ;
140140
141141tc .verifyFalse(stdlib .remove(f ), " should not succeed at removing non-existant path" )
142142
You can’t perform that action at this time.
0 commit comments