Added get_fs_type() method to retrieve the file system type

svn path=/trunk/; revision=1003
This commit is contained in:
Curtis Gedak 2008-12-18 21:36:57 +00:00
parent eace2a51fc
commit 5493f7ecc6
3 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-12-18 Curtis Gedak <gedakc@gmail.com>
* include/FS_Info.h,
src/FS_Info.cc: Added get_fs_type() method
2008-12-08 Curtis Gedak <gedakc@gmail.com>
* include/FS_Info.h,

View file

@ -29,6 +29,7 @@ public:
FS_Info() ;
FS_Info( bool do_refresh ) ;
~FS_Info() ;
Glib::ustring get_fs_type( const Glib::ustring & path ) ;
Glib::ustring get_label( const Glib::ustring & path, bool & found ) ;
Glib::ustring get_uuid( const Glib::ustring & path ) ;
private:

View file

@ -60,6 +60,18 @@ Glib::ustring FS_Info::get_device_entry( const Glib::ustring & path )
return entry;
}
Glib::ustring FS_Info::get_fs_type( const Glib::ustring & path )
{
Glib::ustring fs_type = "" ;
//Retrieve the line containing the device path
Glib::ustring temp = get_device_entry( path ) ;
//Retrieve TYPE
fs_type = Utils::regexp_label( temp, "TYPE=\"([^\"]*)\"" ) ;
return fs_type ;
}
Glib::ustring FS_Info::get_label( const Glib::ustring & path, bool & found )
{
Glib::ustring label = "" ;