Skip to content

STRUCT

DirectoryDescriptor

Contents

swift
public struct DirectoryDescriptor: Equatable

Directory Descriptor

Describes a folder operation that needs to take place as part of generating a project or workspace.

  • seealso: SideEffectsDescriptor

Properties

path

swift
public var path: AbsolutePath

Path to the directory

state

swift
public var state: State

The desired state of the directory (.present creates a fiile, .absent deletes a file)

Methods

init(path:state:)

swift
public init(
    path: AbsolutePath,
    state: DirectoryDescriptor.State = .present
)

Creates a DirectoryDescriptor Descriptor

  • Parameters:
    • path: Path to the file
    • state: The desired state of the file (.present creates a fiile, .absent deletes a file)

Parameters

NameDescription
pathPath to the file
stateThe desired state of the file (.present creates a fiile, .absent deletes a file)