Recent

Author Topic: Liste all real volumes, that is local and internal (not usb, cd and so on...)  (Read 5459 times)

sinfoni

  • Jr. Member
  • **
  • Posts: 56
Hello,

Is there any SIMPLE way to list the volumes of a Mac, except those which are mounted form network, usb, CD, directories, and so on.

I tried tu use getmntinfo :

Code: [Select]
Procedure Listevolume (//vol : Tstrings
);
const MNT_LOCAL = $00001000 ;
var v_fstatfs : statfs;
    buf :  p_statfs;
    i, count: integer;
Begin
    i := 0;
    count := 0;
    buf := nil;
    count := getmntinfo(@buf, 0);
    for i :=0 to count - 1 do begin
    showmessage('Flags: ' + inttostr(buf[i].f_flags) + ' dossier: ' + buf[i].f_mntfromname + ' nom: ' + buf[i].f_mntonname + ' type: ' + buf[i].f_fstypename + ' fsid: ' + inttostr(buf[i].f_fsid.val[0]) + '-' + inttostr(buf[i].f_fsid.val[1]));
        // f_fstypename //* fs type name */
// f_mntonname: //* directory on which mounted */
// f_mntfromname:  //* mounted filesystem */

    end;
end;   

But I can't find any information (again...) about f_flags. The goal is simple: On my Mac Book for instance, I have ONE hard drive. I have also a network drive, a CDrom, an external usb drive, and volumes which are mounted from some directories locate on my unique hard drive. I want to list my unique volume, that is the root '/'.

Thanks,
André.     

 

TinyPortal © 2005-2018