Skip to content

STRUCT

FileList

Contents

  • Properties
    • files
    • excluding
  • Methods
    • init(files:excluding:)
    • list(_:excluding:)
    • empty()
    • glob(_:excluding:)
    • glob(_:excluding:)
swift
public struct FileList: Codable, Equatable

A collection of file globs.

The list of files can be initialized with a string that represents the glob pattern, or an array of strings, which represents a list of glob patterns.

Properties

files

swift
public var files: [FilePath]

Glob patterns to files.

excluding

swift
public var excluding: [FilePath]

Glob patterns to files which will not be used.

Methods

init(files:excluding:)

swift
public init(files: [FilePath], excluding: [FilePath] = [])

list(_:excluding:)

swift
public static func list(_ globs: [FilePath], excluding: [FilePath] = []) -> FileList

Creates a file list from a collection of glob patterns.

  • glob: Relative glob pattern.
  • excluding: Relative glob patterns for excluded files.

empty()

swift
public static func empty() -> FileList

glob(_:excluding:)

swift
public static func glob(
    _ glob: FilePath,
    excluding: [FilePath] = []
) -> FileList

glob(_:excluding:)

swift
public static func glob(
    _ glob: FilePath,
    excluding: FilePath?
) -> FileList

Returns a file list glob with an optional excluding path.