Compare
Websites
Templates
Store
Pricing
Docs
Blog
Log in
Sign up
How to
How it works
API reference
File types
sjs-4
Collection
File
Attributes
attrInt32
attrStr
chainAttrInt32
chainAttrStr
hasAttrInt32
hasAttrStr
listAttrInt32
listAttrStr
removeAttrInt32
removeAttrStr
Execution
Misc
Mutation
Properties
Traversal
Injected variables
User
os
util
Modules
sjs-4e
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
Glossary
File.prototype.hasAttrInt32()
Reports whether file has given int32 attribute defined.
Syntax
file.hasAttrInt32(key string) boolean
Parameters
key string
Name of the attribute.
Examples
Basic example.
var f = new File() f.attrInt32("score", 13) var p = '' p += f.hasAttrInt32("score") + "\n" p += f.hasAttrInt32("undefined") + "\n" response.body(p)
Run