User Tools

Site Tools


uphp:functions:disk_free_space

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
uphp:functions:disk_free_space [2017/05/11 22:45]
jeff
uphp:functions:disk_free_space [2019/03/05 09:21]
admin
Line 1: Line 1:
 ======disk_free_space====== ======disk_free_space======
  
-<badge>WMPRO, WMMINI FW >= 1.55</badge> <badge>WMMEGA FW >= 2.0</badge>+<badge>WMPRO, WMMINI FW >= 1.55</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WM2 FW >= 3.0</badge>
  
-Return free space on microSD card+Return free space on drive
  
 ====Description==== ====Description====
Line 9: Line 9:
 <well size="sm"><html> <well size="sm"><html>
 <span style="font-size:125%;color:green">int <span style="font-size:125%;color:green">int
-<span style="color:black">disk_free_space ( )+<span style="color:black">disk_free_space ( <span style="font-size:125%;color:green">int <span style="color:blue">$drive<span style="color:black">)
 </html></well> </html></well>
  
 ====Parameters==== ====Parameters====
  
-None+<html><b><span style="color:blue">$drive<span style="color:black"></b></html>:  0=sd card, 1=internal flash (M2 only) 
  
 ====Return Values==== ====Return Values====
  
-KiloBytes (KB) available on the microSD card (Bytes/1024rounded to an <html><b><span style="color:green">integer<span style="color:black"></b></html>)+Status of the driveunmounted and 0 mounted.  
  
 ====Example==== ====Example====
Line 24: Line 25:
 <code php> <code php>
 <? <?
-  $df=disk_free_space(); +  $d1=disk_status(0); 
-  print("The card has ".$df.KiloBytes free."); +  if ($d1)  
 +    print("MicroSD card unmounted");  
 +  $d2=disk_status(1); 
 +  if ($d2)  
 +    print("Flash unmounted");  
 +    
 ?> ?>
 </code> </code>
Line 33: Line 39:
 [[disk_total_space()]] - Return total space on microSD card [[disk_total_space()]] - Return total space on microSD card
  
-[[freemem()]] - Return free memory space +[[get_drive()]] - Return boot drive
- +
-[[freestack()]] - Return free stack space+
  
-[[nvram_free()]] - Return the number of bytes available in <tooltip title="Non-Volatile RAM">NVRAM</tooltip> 
  
uphp/functions/disk_free_space.txt · Last modified: 2021/09/13 05:57 (external edit)