TargetFile

public protocol TargetFile : LuaWrapper

The target file pointer.

  • The file system that contains this file.

    Declaration

    Swift

    var fileSystem: VirtualFileSystem { get }
  • The absolute path of this file (local for it’s file system).

    Declaration

    Swift

    var absolutePath: String { get }
  • The simple name of this file with an extension.

    Declaration

    Swift

    var simpleName: String { get }
  • openOutputStream(overwrite:) Extension method

    Opens the FileOutputStream for this file.

    Declaration

    Swift

    public func openOutputStream(overwrite: Bool) throws -> FileOutputStream
  • exists() Extension method

    True if the file exists.

    Declaration

    Swift

    public func exists() -> Bool
  • getFile() Extension method

    Get the VirtualFile for this file, or nil if the file is not found.

    Declaration

    Swift

    public func getFile() -> VirtualFile?
  • toWeak() Extension method

    Converts this target file to a weak one.

    Declaration

    Swift

    public func toWeak() -> WeakTargetFile
  • isRoot Extension method

    True if this target file points to the FS root (/).

    Declaration

    Swift

    public var isRoot: Bool { get }
  • appendingPathComponent(_:) Extension method

    Returns the target file with the appended path.

    Declaration

    Swift

    public func appendingPathComponent(_ path: String) -> TargetFile