public static NeoMode_T ChMod(this NeoMode_T toSet, uint bits) { toSet &= ~NeoMode_T.S_PRODMSK; toSet |= (NeoMode_T)bits & NeoMode_T.S_PRODMSK; // Make sure bits is sane return((NeoMode_T)toSet); }
public static NeoMode_T_FileTypes FileType(this NeoMode_T mode) { var val = (uint)(mode & NeoMode_T.S_IFMT); val >>= 12; return((NeoMode_T_FileTypes)val); }
public static NeoMode_T SetFileType(this NeoMode_T toSet, NeoMode_T_FileTypes inType) { toSet &= (~NeoMode_T.S_IFMT); // Clear the bits var outV = (uint)toSet; outV |= ((uint)inType) << 12; return((NeoMode_T)outV); }
public static mode_t GetMode(this NeoMode_T convert) { return((mode_t)(uint)convert); }
public static NeoMode_T Set(this NeoMode_T toSet, NeoMode_T bits) { toSet |= bits; return((NeoMode_T)toSet); }
public static NeoMode_T UnSet(this NeoMode_T toSet, NeoMode_T bits) { toSet &= ~bits; return((NeoMode_T)toSet); }