VirtualFileSystemContributor

public protocol VirtualFileSystemContributor : Extension

New virtual file system contributor.

  • Returns true if the file system supports this file name.

    Note: This method is called in the UI thread. Avoid time-consuming checks.

    Declaration

    Swift

    func isApplicable(fileName: String) -> Bool
  • Returns the root directory for the given target file.

    This method is called in the background thread. Note that the newly created file system may be used in different threads, so it needs to be thread-safe.

    Declaration

    Swift

    func open(target: VirtualFile, localCopy: LocalFile) throws -> VirtualFile
  • Returns the name of this contributor.

    Declaration

    Swift

    func getName(fileName: String) -> String
  • Name for the Open with action.

    Declaration

    Swift

    var openWithName: String { get }
  • icon Default implementation

    Icon to be displayed in Open with.

    Default Implementation

    No icon by default.

    Declaration

    Swift

    var icon: NSImage? { get }
  • File system kind.

    Declaration

    Swift

    var kind: VirtualFileSystemContributorKind { get }