File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 11%% DISK_AVAILABLE disk available space (bytes)
2- % optional: mex
32%
43% example: stdlib.disk_available('/')
54%
1312f = uint64(0 );
1413if ~stdlib .exists(d ), return , end
1514
16- if stdlib .has_dotnet()
15+ if stdlib .has_python()
16+ di = py .shutil .disk_usage(d );
17+ f = uint64(di .free );
18+ elseif stdlib .has_dotnet()
1719 f = System .IO .DriveInfo(stdlib .absolute(d )).AvailableFreeSpace();
1820 % https://learn.microsoft.com/en-us/dotnet/api/system.io.driveinfo.availablefreespace
1921elseif stdlib .has_java()
Original file line number Diff line number Diff line change @@ -263,14 +263,14 @@ function build_exe(context)
263263srcs = {
264264" src/remove.cpp" , ...
265265[" src/normalize.cpp" , normal ], ...
266- " src/disk_available.cpp" , ...
267266" src/disk_capacity.cpp" , ...
268267" src/set_permissions.cpp" , ...
269268};
270269
271270if ~stdlib .has_python() || build_all
272271srcs{end + 1 } = " src/is_char_device.cpp" ;
273272srcs{end + 1 } = [" src/is_admin.cpp" , " src/admin_fs.cpp" ];
273+ srcs{end + 1 } = " src/disk_available.cpp" ;
274274end
275275
276276if (isMATLABReleaseOlderThan(" R2024b" ) && ~stdlib .has_dotnet()) || build_all
Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ function test_touch_modtime(tc)
8080tc .verifyGreaterThanOrEqual(t1 , t0 )
8181end
8282
83-
84- function test_get_modtime(tc )
85- tc .verifyEmpty(stdlib .get_modtime(" " ))
86- end
87-
8883function test_set_modtime(tc )
8984tc .verifyEqual(stdlib .set_modtime(" " , datetime(" now" )), false )
9085end
Original file line number Diff line number Diff line change 1+ classdef TestTime < matlab .unittest .TestCase
2+
3+ methods (Test )
4+
5+ function test_get_modtime(tc )
6+ tc .verifyEmpty(stdlib .get_modtime(" " ))
7+ end
8+
9+
10+ end
11+
12+ end
You can’t perform that action at this time.
0 commit comments