 		}
 		return Int(st.st_size)
 	}
-	
+
 	/// Returns true if the file is a symbolic link
     public var isLink: Bool {
 		var st = stat()

		let mode = st.st_mode
		return (Int32(mode) & Int32(S_IFMT)) == Int32(S_IFDIR)
	}
	
	/// Returns the UNIX style permissions for the file
    public var perms: PermissionMode {
		get {
			var st = stat()
			let statRes = isOpen ?  fstat(Int32(fd), &st) : stat(internalPath, &st)
			guard statRes != -1 else {
				return PermissionMode(rawValue: 0)
			}
			let mode = st.st_mode
			return PermissionMode(rawValue: mode_t(Int32(mode) ^ Int32(S_IFMT)))

}

public extension File {

	/// Attempts to place an advisory lock starting from the current position marker up to the indicated byte count. This function will block the current thread until the lock can be performed.
	/// - parameter byteCount: The number of bytes to lock
	/// - throws: `PerfectError.FileError`
