Bundle

public extension Bundle
  • The Path of the receiver’s bundle directory.

    Declaration

    Swift

    var path: Path { get }
  • Returns the path for the resource identified by the specified name and file extension.

    Declaration

    Swift

    func path(forResource name: String?, withExtension extension: String?) -> Path?

    Parameters

    name

    The name of the resource file

    extension

    The filename extension of the file to locate.

    Return Value

    The path for the resource file, or nil if the file could not be located.