WeakTargetFile

public protocol WeakTargetFile : LuaWrapper

The target file pointer that does not hold a strong reference to the file system.

  • 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?
  • toTarget() Extension method

    Converts the weak target to the ordinary one.

    Declaration

    Swift

    public func toTarget() -> TargetFile?
  • isRoot Extension method

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

    Declaration

    Swift

    public var isRoot: Bool { get }