Module

GitHub.Actions.IO

Exports functions from the @actions/io module provided by GitHub https://github.com/actions/toolkit/tree/main/packages/io

#CopyOptions

type CopyOptions = { force :: Maybe Boolean, recursive :: Maybe Boolean }

Whether to recursively copy all subdirectories. Defaults to false Whether to overwrite existing files in the destination. Defaults to true

#defaultCopyOptions

defaultCopyOptions :: CopyOptions

Defaults for CopyOptions. Override as needed.

#MoveOptions

type MoveOptions = { force :: Maybe Boolean }

Whether to overwrite existing files in the destination. Defaults to true

#defaultMoveOptions

defaultMoveOptions :: MoveOptions

Defaults for MoveOptions. Override as needed.

#mv

mv :: MvArgs -> ExceptT Error Aff Unit

Moves a path

#mv'

mv' :: { dest :: FilePath, source :: FilePath } -> ExceptT Error Aff Unit

Moves a path

#MvArgs

type MvArgs = { dest :: FilePath, options :: Maybe MoveOptions, source :: FilePath }

source: source path dest: destination path options: See MoveOptions

#cp

cp :: CpArgs -> ExceptT Error Aff Unit

Copies a file or folder

#cp'

cp' :: { dest :: FilePath, source :: FilePath } -> ExceptT Error Aff Unit

Copies a file or folder

#CpArgs

type CpArgs = { dest :: FilePath, options :: Maybe CopyOptions, source :: FilePath }

source: source path dest: destination path options: See CopyOptions

#mkdirP

mkdirP :: MkdirPArgs -> ExceptT Error Aff Unit

Make a directory. Creates the full path with folders in between. Will throw if it fails

#MkdirPArgs

type MkdirPArgs = { fsPath :: FilePath }

fsPath: path to create

#which

which :: WhichArgs -> ExceptT Error Aff FilePath

Returns path of a tool had the tool actually been invoked. Resolves via paths. If you check and the tool does not exist, it will throw.

#WhichArgs

type WhichArgs = { check :: Maybe Boolean, tool :: String }

tool: name of the tool check: whether to check if tool exists. Defaults to false

#rmRF

rmRF :: RmRFArgs -> ExceptT Error Aff Unit

Remove a path recursively with force

#RmRFArgs

type RmRFArgs = { inputPath :: FilePath }

inputPath: path to remove

Modules