mod attribute_list;
mod file_name;
mod index_allocation;
mod index_root;
mod object_id;
mod standard_information;
mod volume_information;
mod volume_name;
use core::fmt;
pub use attribute_list::*;
pub use file_name::*;
pub use index_allocation::*;
pub use index_root::*;
pub use object_id::*;
pub use standard_information::*;
pub use volume_information::*;
pub use volume_name::*;
use binrw::io::{Read, Seek};
use bitflags::bitflags;
use crate::attribute::NtfsAttributeType;
use crate::attribute_value::{NtfsAttributeValue, NtfsResidentAttributeValue};
use crate::error::Result;
bitflags! {
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct NtfsFileAttributeFlags: u32 {
const READ_ONLY = 0x0001;
const HIDDEN = 0x0002;
const SYSTEM = 0x0004;
const ARCHIVE = 0x0020;
const DEVICE = 0x0040;
const NORMAL = 0x0080;
const TEMPORARY = 0x0100;
const SPARSE_FILE = 0x0200;
const REPARSE_POINT = 0x0400;
const COMPRESSED = 0x0800;
const OFFLINE = 0x1000;
const NOT_CONTENT_INDEXED = 0x2000;
const ENCRYPTED = 0x4000;
const IS_DIRECTORY = 0x1000_0000;
}
}
impl fmt::Display for NtfsFileAttributeFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
}
pub trait NtfsStructuredValue<'n, 'f>: Sized {
const TY: NtfsAttributeType;
fn from_attribute_value<T>(fs: &mut T, value: NtfsAttributeValue<'n, 'f>) -> Result<Self>
where
T: Read + Seek;
}
pub trait NtfsStructuredValueFromResidentAttributeValue<'n, 'f>:
NtfsStructuredValue<'n, 'f>
{
fn from_resident_attribute_value(value: NtfsResidentAttributeValue<'f>) -> Result<Self>;
}