File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11function [t , cmd ] = disk_available(p )
22
3- t = uint64([]) ;
3+ t = [] ;
44
55if ispc()
66 dl = extractBefore(stdlib .absolute(p ), 2 );
7- cmd = " pwsh -c (Get-Volume -DriveLetter " + dl + " ).SizeRemaining" ;
7+ cmd = sprintf( ' pwsh -c " (Get-Volume -DriveLetter ''%s'' ).SizeRemaining"' , dl ) ;
88elseif ismac()
99 cmd = sprintf(' df -k "%s " | awk '' NR==2 {print $4*1024}'' ' , p );
1010else
1414if stdlib .exists(p )
1515 [s , t ] = system(cmd );
1616 if s == 0
17- t = uint64( str2double(t ) );
17+ t = str2double(t );
1818 end
1919end
2020
21+ t = uint64(t );
22+
2123end
Original file line number Diff line number Diff line change 11function [t , cmd ] = disk_capacity(p )
22
3- t = uint64([]) ;
3+ t = [] ;
44
55if ispc()
66 dl = extractBefore(stdlib .absolute(p ), 2 );
You can’t perform that action at this time.
0 commit comments