Struct libparted::FileSystem
[−]
[src]
pub struct FileSystem<'a> { /* fields omitted */ }
Methods
impl<'a> FileSystem<'a>
[src]
fn from_raw(fs: *mut PedFileSystem) -> FileSystem<'a>
[src]
fn checked(&self) -> bool
[src]
fn geom<'b>(&'b mut self) -> Geometry<'b>
[src]
fn type_<'b>(&'b mut self) -> FileSystemType<'b>
[src]
fn open(geom: &'a Geometry) -> Option<FileSystem<'a>>
[src]
Opens the file system stored on geom
, if it can find one.
Examples
let mut fs = FileSystem::open(&mut geometry);
let mut fs = geometry.open_fs();
Throws
PED_EXCEPTION_ERROR
if the file system could not be detected.PED_EXCEPTION_ERROR
if the file system is bigger than its volume.PED_EXCEPTION_NO_FEATURE
if opening of a file system stored ongeom
is not implemented.
Note
This actually calls Geometry::open_fs
fn probe(geom: &'a Geometry) -> Result<FileSystemType<'a>>
[src]
Attempt to detect a file system in region geom
.
This function tries to be clever at dealing with ambiguous situations, such as when one file system was not completely erased before a new file system was created on on top of it.
Note
This actually calls geom.probe_fs()
.
fn probe_specific(
geom: &'a Geometry,
fs_type: &'a FileSystemType
) -> Option<Geometry<'a>>
[src]
geom: &'a Geometry,
fs_type: &'a FileSystemType
) -> Option<Geometry<'a>>
Attempt to find a file system and return the region it occupies.
Note
This actually calls geom.probe_specific_fs(fs_type)
fn resize(&mut self, geom: &Geometry, timer: Option<&mut Timer>) -> Result<()>
[src]
Resize the file system to a new geometry.
Note
geom
should satisfy the FileSystem::get_resize_constraint()
. This isn't
asserted, so it's not a bug not to, but is is likely to fail.
If timer
is not None
, it will be used as the progress meter.
Throws
Throws PED_EXCEPTION_NO_FEATURE
if resizing of the file system is not implemented yet.