Skip to content

std.fs-file resource

Description

File writes a regular file to the local filesystem. The file's path is part of the input set; changing the path replaces the resource (the prior file is deleted and a new one is written at the new path). CreateDirectory opts the resource into creating any missing parent directories of Path. Without it, a missing parent is an error so callers do not accidentally write outside an expected tree.

Source: internal/fs/file_rsrc.go:23

Example usage:

imports: {
  std: 'github.com/cloudboss/unobin-library-std'
}

resources: {
  example: std.fs-file {
    # Set input fields here.
  }
}

Inputs

path

string

required

content

string

required

mode

integer

default 420

create-directory

boolean

Input Constraints

This kind declares no extra input constraints.

Outputs

sha256

string

size

integer