file:delete

Deletes a file or a directory from the file system.

delete($path as xs:string) ➔ empty-sequence()

Arguments

 

$path

xs:string

Path to file/directory

Result

empty-sequence()

delete($path as xs:string, $recursive as xs:boolean) ➔ empty-sequence()

Arguments

 

$path

xs:string

Path to file/directory

 

$recursive

xs:boolean

Whether the operation should recurse down though the filesystem tree

Result

empty-sequence()

Namespace

http://expath.org/ns/file

Links to specifications

EXPath File Module

Saxon availability

Available whether or not support for XPath 3.0 is enabled. Implemented since Saxon 9.5. Requires Saxon-PE or Saxon-EE.