//! Constants

/// Bits within inode used to indicate type (see *_TYPE below)
///
/// The most significant bit isn't actually used to ease casting
/// between u64 and i64.
pub const TYPE_MASK: u64 = 0x7 << 61;

//# Bits set in an inode to indicate a file
pub const FILE_TYPE: u64 = 0x3 << 61;

/// Last inode belonging to file type
pub const FILE_TYPE_END: u64 = !TYPE_MASK | FILE_TYPE;

/// Bits set in an inode to indicate a folder
pub const FOLDER_TYPE: u64 = 0x2 << 61;

/// Last inode belonging to folder type
pub const FOLDER_TYPE_END: u64 = !TYPE_MASK | FOLDER_TYPE;

/// Bits set in an inode to indicate a domain
pub const DOMAIN_TYPE: u64 = 0x1 << 61;

/// Last inode belonging to folder type
pub const DOMAIN_TYPE_END: u64 = !TYPE_MASK | DOMAIN_TYPE;

pub const RESERVED_TYPE: u64 = 0x0 << 61;

/// Root directory of FS, AKA "/"
pub const ROOT_ID: u64 = RESERVED_TYPE | 1;

//# FUSE requires this to be 1.
const _: () = const { assert!(ROOT_ID == fuser::FUSE_ROOT_ID) };

/// Used internally to represent directory "."
///
/// FUSE should never see this inode number.
pub const DOT_ID: u64 = RESERVED_TYPE | 2;

/// Used internally to represent directory ".."
///
/// FUSE should never see this inode number.
pub const DOT_DOT_ID: u64 = RESERVED_TYPE | 3;

///  Lost and found directory
pub const LOST_AND_FOUND_ID: u64 = RESERVED_TYPE | 4;

/// Name of lost and found folder
pub const LOST_AND_FOUND_NAME: &str = ".lost+found";

/// String representing null BU on Tocco API
pub const TOCCO_NULL_BU: &str = "__n-u-l-l__";
