aboutsummaryrefslogtreecommitdiffstats
path: root/zone_zfs/src/file_system.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zone_zfs/src/file_system.rs')
-rw-r--r--zone_zfs/src/file_system.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/zone_zfs/src/file_system.rs b/zone_zfs/src/file_system.rs
index 62169d0..85bd6ca 100644
--- a/zone_zfs/src/file_system.rs
+++ b/zone_zfs/src/file_system.rs
@@ -1,5 +1,5 @@
use crate::{Error, Result, Snapshot};
-use bytesize::ByteSize;
+use byte_unit::Byte;
use derive_builder::Builder;
use std::{
ffi::{OsStr, OsString},
@@ -26,7 +26,7 @@ macro_rules! concat_opt [
pub struct FileSystem {
dataset: PathBuf,
mountpoint: PathBuf,
- quota: ByteSize,
+ quota: Byte,
}
impl Display for FileSystem {
@@ -65,7 +65,7 @@ impl FileSystem {
}
/// Get the file system's quota.
- pub fn quota(&self) -> ByteSize {
+ pub fn quota(&self) -> Byte {
self.quota
}
@@ -104,7 +104,7 @@ impl FileSystem {
})
}
- pub fn set_quota(&mut self, quota: ByteSize) -> Result<Self> {
+ pub fn set_quota(&mut self, quota: Byte) -> Result<Self> {
self.set_opt("quota", quota.to_string())?;
self.quota = quota;
Ok(self.to_owned())
@@ -116,10 +116,6 @@ impl FileSystem {
Ok(self.to_owned())
}
- pub fn get_mountpoint(&self) -> PathBuf {
- self.mountpoint.to_owned()
- }
-
pub fn get_snapshots(&self) -> Result<Vec<Snapshot>> {
Command::new("zfs")
.arg("list")