Added get_fs_type() method to retrieve the file system type
svn path=/trunk/; revision=1003
This commit is contained in:
parent
eace2a51fc
commit
5493f7ecc6
|
@ -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>
|
2008-12-08 Curtis Gedak <gedakc@gmail.com>
|
||||||
|
|
||||||
* include/FS_Info.h,
|
* include/FS_Info.h,
|
||||||
|
|
|
@ -29,6 +29,7 @@ public:
|
||||||
FS_Info() ;
|
FS_Info() ;
|
||||||
FS_Info( bool do_refresh ) ;
|
FS_Info( bool do_refresh ) ;
|
||||||
~FS_Info() ;
|
~FS_Info() ;
|
||||||
|
Glib::ustring get_fs_type( const Glib::ustring & path ) ;
|
||||||
Glib::ustring get_label( const Glib::ustring & path, bool & found ) ;
|
Glib::ustring get_label( const Glib::ustring & path, bool & found ) ;
|
||||||
Glib::ustring get_uuid( const Glib::ustring & path ) ;
|
Glib::ustring get_uuid( const Glib::ustring & path ) ;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -60,6 +60,18 @@ Glib::ustring FS_Info::get_device_entry( const Glib::ustring & path )
|
||||||
return entry;
|
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 FS_Info::get_label( const Glib::ustring & path, bool & found )
|
||||||
{
|
{
|
||||||
Glib::ustring label = "" ;
|
Glib::ustring label = "" ;
|
||||||
|
|
Loading…
Reference in New Issue