File tree Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Original file line number Diff line number Diff line change 22
33function i = disk_available(file )
44
5- i = uint64 .empty ;
6- if ~stdlib .exists(file )
7- return
8- end
9-
105try
116% absolutizing is necessary for Windows especially
127 i = System .IO .DriveInfo(System .IO .Path .GetFullPath(file )).AvailableFreeSpace();
138% https://learn.microsoft.com/en-us/dotnet/api/system.io.driveinfo.availablefreespace
149catch e
1510 dotnetException(e )
11+ i = [];
1612end
1713
1814i = uint64(i );
Original file line number Diff line number Diff line change 22
33function i = disk_capacity(file )
44
5- i = uint64 .empty ;
6- if ~stdlib .exists(file )
7- return
8- end
9-
105try
116% absolutizing is necessary for Windows especially
127 i = System .IO .DriveInfo(System .IO .Path .GetFullPath(file )).TotalSize();
138% https://learn.microsoft.com/en-us/dotnet/api/system.io.driveinfo.totalsize
149catch e
1510 dotnetException(e )
11+ i = [];
1612end
1713
1814i = uint64(i );
Original file line number Diff line number Diff line change 33function t = filesystem_type(file )
44
55
6- t = ' ' ;
7- if ~stdlib .exists(file )
8- return
9- end
10-
116% https://learn.microsoft.com/en-us/dotnet/api/system.io.driveinfo.driveformat
127
138try
149 t = char(System .IO .DriveInfo(System .IO .Path .GetFullPath(file )).DriveFormat);
1510catch e
1611 dotnetException(e )
12+ t = ' ' ;
1713end
1814
1915end
You can’t perform that action at this time.
0 commit comments