Control Panel
Platform
Website Builder
Turbo CSS
Pricing
Blog
Log in
Sign up
Examples
Packages
How to
How it works
API reference
Glossary
File types
sjs-4
Bucket
Collection
File
Attributes
Execution
Misc
Mutation
copy
move
new
remove
rename
Properties
Traversal
Injected variables
User
os
util
Modules
sjs-4e
sjs-4et
accept-2
accept-3
app-1
contextmenu-1
css-1
css-2
css-2-wrapper
html-1
image-1
markdown-1
redirect-301
sh-1
static-1
svg-1
deprecated types
File links
App interface
Hotkeys & mouse controls
HTML classes
Filesystem Query Language
Reserved namespaces
Filesystem interface versions
File.prototype.remove()
Remove a file.
Syntax
file.remove()
Description
Remove a file with its entire subtree. Links are not followed.
Examples
Basic example.
var temp = new File() var A = temp.new(os.APPEND, "A", 0) var B = temp.new(os.APPEND, "B", 0) var p = '' temp.children().each(function(file) { p += file.path() + "\n" }) p += "\n" A.remove() temp.children().each(function(file) { p += file.path() + "\n" }) response.body(p)
Run