2012-02-16 4 views

答えて

1

私は、boostがファイルシステムの種類を問い合わせるための方法を提供していないと思います。しかし、この目的のためにstatfs関数を使いたいかもしれません。マニュアルページから -

機能statfs()は、マウントされたファイルシステムに関する情報を返します。 pathは、マウントされたファイルシステム内のファイルのパス名です。 bufは、以下のようにほぼ定義されたstatfs構造体へのポインタです。

 struct statfs { 
      __SWORD_TYPE f_type; /* type of file system (see below) */ 
      __SWORD_TYPE f_bsize; /* optimal transfer block size */ 
      fsblkcnt_t f_blocks; /* total data blocks in file system */ 
      fsblkcnt_t f_bfree; /* free blocks in fs */ 
      fsblkcnt_t f_bavail; /* free blocks available to 
             unprivileged user */ 
      fsfilcnt_t f_files; /* total file nodes in file system */ 
      fsfilcnt_t f_ffree; /* free file nodes in fs */ 
      fsid_t  f_fsid; /* file system id */ 
      __SWORD_TYPE f_namelen; /* maximum length of filenames */ 
      __SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */ 
      __SWORD_TYPE f_spare[5]; 
     }; 
関連する問題