Developer
Intros
How it works
API reference
File types
sjs-4
Bucket
children
interface
isDefined
name
parent
title
Collection
File
Injected variables
User
os
util
Modules
sjs-4e
sjs-4et
app-1
buckets-1
contextmenu-1
css-1
css-2
css-2-wrapper
html-1
image-1
markdown-1
page-1
redirect-301
sh-1
static-1
svg-1
deprecated types
File links
App interface
Hotkeys & mouse controls
Nocode editor API
Filesystem Query Language
Reserved namespaces
Filesystem interface versions
URL endpoints
URL query parameters
Turbo CSS
Blog
Developer
Intros
How it works
API reference
Turbo CSS
Blog
File types
sjs-4
Bucket
children
interface
isDefined
name
parent
title
Collection
File
Injected variables
User
os
util
Modules
sjs-4e
sjs-4et
app-1
buckets-1
contextmenu-1
css-1
css-2
css-2-wrapper
html-1
image-1
markdown-1
page-1
redirect-301
sh-1
static-1
svg-1
deprecated types
File links
App interface
Hotkeys & mouse controls
Nocode editor API
Filesystem Query Language
Reserved namespaces
Filesystem interface versions
URL endpoints
URL query parameters
Bucket.prototype.parent()
Get the file containing the bucket.
Syntax
bucket.parent() File
Description
Get the file containing the bucket.
Examples
Parent of a defined bucket.
var f = new File(); f.type("app-1"); var bucketsDefinition = f.new(os.APPEND, ".Buckets"); bucketsDefinition.type("buckets-1"); bucketsDefinition.body(JSON.stringify([ { name: "main", title: "Main", interface: ".Inline" } ])); var bucket = f.bucket("main"); response.body(bucket.parent().path());
Run
Name of an undefined bucket.
var f = new File(); f.type("app-1"); var bucket = f.unsafeBucket("undefined-bucket"); response.body(bucket.parent().path());
Run