Skip to content
Oleg edited this page May 14, 2017 · 3 revisions

Del (delete files) task

Requires version 0.10.x

Deletes individual files, folders and filesets.

Also available as del task.

Del task accepts settings of the RmArgs type:

    type RmArgs = {
        dir: string
        file: string
        files: Fileset
        verbose: bool
    }

Command is available via both common and simplified syntax:

open Xake.Tasks
...
do! Rm {RmArgs.Default with file = "samplefile"}
/// or simplified syntax:
do! rm {file "samplefile"}

Example: delete file

do! rm {file "samplefile"}

The following code deletes file by mask:

do! rm {file "temp*.txt"}

Example: delete folder

The following code will delete folder with all its contents and subfolders:

do! rm {dir "a"}

Example: remove fileset

do! rm {
    files (fileset {
        includes "samplefile*"
    })
}

Example: verbose delete option

verbose settings instructs command to output each file name while removing file of directory

do! rm {dir "a"; verbose}
Clone this wiki locally