GetDiskFreeSpace & GetVolumeInformation on Linux & Mac ?

Just starting out? Need help? Post your questions and find answers here.
sverson
Enthusiast
Enthusiast
Posts: 286
Joined: Sun Jul 04, 2004 12:15 pm
Location: Germany

GetDiskFreeSpace & GetVolumeInformation on Linux & Mac ?

Post by sverson »

Hi Linux & Mac experts,

I am looking for functions similar to the Win API functions GetDiskFreeSpaceEx_ & GetVolumeInformation_.

Thanks.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GetDiskFreeSpace & GetVolumeInformation on Linux & Mac ?

Post by IdeasVacuum »

I don't know - in Unix you would use something like:

Code: Select all

df -h
df -k
So if df is also used by Linux (I think so), you can do something in PB with RunProgram()

This might help for the MAC:

http://developer.apple.com/library/mac/ ... til.8.html
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Re: GetDiskFreeSpace & GetVolumeInformation on Linux & Mac ?

Post by LuCiFeR[SD] »

statvfs() and fstatvfs() are probably what you would require. Just search for those in the "flavour of linux you use" man pages for info about the structures etc.
sverson
Enthusiast
Enthusiast
Posts: 286
Joined: Sun Jul 04, 2004 12:15 pm
Location: Germany

Re: GetDiskFreeSpace & GetVolumeInformation on Linux & Mac ?

Post by sverson »

Thanks IdeasVacuum,
Thanks LuCiFeR[SD]

remi_meier actually wrote a statvfs example:
PureBoard (german)

:wink:
Post Reply