mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
block size is always 512 on rust
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
use std;
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
||||
pub fn get_block_size() -> u64 {
|
||||
1024
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
pub fn get_block_size() -> u64 {
|
||||
fn get_block_size() -> u64 {
|
||||
// All os specific implementations of MetatdataExt seem to define a block as 512 bytes
|
||||
// https://doc.rust-lang.org/std/os/linux/fs/trait.MetadataExt.html#tymethod.st_blocks
|
||||
512
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user