     public static let SetGID       = FileMode(rawValue: 1 << 10)
     public static let SetUID       = FileMode(rawValue: 1 << 11)
 
-    public init(rawValue: Int) {
+    public init(rawValue: UInt16) {
         self.rawValue = rawValue & ((1 << 12) - 1)
-    }
-
-    private init(_ mode: FileMode) {
-        self.rawValue = mode.rawValue
     }
 }
 

    /// file size
    let size: UInt64

    /// is this a directory
    let isDir: Bool

    /// is this a symlink
    let isLink: Bool

    /// path to original if this is a symlink
    let linkTarget: Path?

    }
}

public enum FileType: UInt16 {
    case Invalid = 0
    case FIFO = 1
    case CharacterDevice = 2
    case Directory = 4
    case BlockDevice = 6
    case File = 8
    case Symlink = 10
    case Socket = 12
    case Whiteout = 14

    private init?(statMode: UInt16) {
        self.init(rawValue: (statMode & 0xf000) >> 12)
    }
}

/// File information
public struct FileInfo {

