     public fileprivate(set) var path: String? = nil
 
     public func cursorPosition() throws -> Int {
-        let position = Int(filetell(file))
+        let position = Int(mill_mftell_(file))
         try ensureLastOperationSucceeded()
         return position
     }
 
     public func seek(cursorPosition: Int) throws -> Int {
-        let position = Int(fileseek(file, off_t(cursorPosition)))
+        let position = Int(mill_mfseek_(file, off_t(cursorPosition)))
         try ensureLastOperationSucceeded()
         return position
     }
 
     public var length: Int {
-        return Int(filesize(self.file))
+        return Int(mill_mfsize_(self.file))
     }
 
     public var cursorIsAtEndOfFile: Bool {
-        return fileeof(file) != 0
+        return mill_mfeof_(file) != 0
     }
 
     public lazy var fileExtension: String? = {


    public func close() {
        if !closed {
            fileclose(file)
        }
        closed = true
    }

    }

    public convenience init(fileDescriptor: FileDescriptor) throws {
        let file = mill_mfattach_(fileDescriptor)
        try ensureLastOperationSucceeded()
        self.init(file: file!)
    }

    public convenience init(path: String, mode: FileMode = .read) throws {
        let file = mill_mfopen_(path, mode.value, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
        try ensureLastOperationSucceeded()
        self.init(file: file!)
        self.path = path
