Bundle

public extension Bundle

Extensions on Foundation’s Bundle so you get Path rather than String or URL.

  • Returns the path for requested resource in this bundle.

    Declaration

    Swift

    func path(forResource: String, ofType: String?) -> Path?
  • Returns the path for the shared-frameworks directory in this bundle.

    Note

    This is typically ShareFrameworks

    Declaration

    Swift

    var sharedFrameworks: DynamicPath { get }
  • Returns the path for the private-frameworks directory in this bundle.

    Note

    This is typically Frameworks

    Declaration

    Swift

    var privateFrameworks: DynamicPath { get }
  • Returns the path for the resources directory in this bundle.

    Declaration

    Swift

    var resources: DynamicPath { get }
  • Returns the path for this bundle.

    Declaration

    Swift

    var path: DynamicPath { get }
  • Returns the executable for this bundle, if there is one, not all bundles have one hence Optional.

    Declaration

    Swift

    var executable: DynamicPath? { get }