Lazarus

Programming => Operating Systems => Linux => Topic started by: wotanica on October 01, 2010, 10:31:51 pm

Title: List drives on linux
Post by: wotanica on October 01, 2010, 10:31:51 pm
Does anyone have a function to list the drives (mounted volumes) on a linux system?
In windows you can use the "GetLogicalDriveStrings()" API function, and on the Mac you can use normal pascal to list the drives in /Volumes.

Is it as simple as using findfirst/next/close on the /mnt folder?
Title: Re: List drives on linux
Post by: theo on October 01, 2010, 10:49:09 pm
Have a look at /etc/mtab
for ex:
Code: Pascal  [Select][+][-]
  1. Memo1.Lines.LoadFromFile('/etc/mtab');              
Title: Re: List drives on linux
Post by: wotanica on October 02, 2010, 12:14:30 am
Have a look at /etc/mtab
for ex:
Code: Pascal  [Select][+][-]
  1. Memo1.Lines.LoadFromFile('/etc/mtab');              

Thanx! Will check it out!
Title: Re: List drives on linux
Post by: mica on October 02, 2010, 10:41:22 am
cat /proc/partitions

or as root

fdisk -l
 
or parted -l
TinyPortal © 2005-2018