20
The Fireworks Object Model
deleteFile(docOrDir)
string
Deletes the specified file or directory.
Returns
true
if successful;
false
if the
file or directory does not exist or cannot
be deleted. Compare with
deleteFileIfExisting()
.
deleteFileIfExisting (docOrDir)
string
Deletes the specified file or directory.
Returns
true
if successful;
false
if the
file or directory cannot be deleted.
Unlike
deleteFile()
, this method
returns
true
if the file or directory does
not exist.
enumFiles(docOrDir)
string
Returns an array of file URLs. If
docOrDir
is a directory, the array
contains an entry for every file or
directory that is contained in
the specified directory. If
docOrDir
is a
file, the array contains a single entry
(the file passed in).
exists(docOrDir)
string
Returns
true
if
docOrDir
refers to a
directory or file that exists;
false
otherwise.
getDirectory(docname)
string
Returns only the directory name from
docname
, which is expressed as
file://
URL
. For example,
Files.getDirectory("file://work/
logo.png")
returns
"file:///work"
.
getExtension(docname)
string
Returns the filename extension, if any,
of docname. For example,
Files.getExtension("birthday.png")
returns
".png"
. If the filename has no
extension, an empty string is returned. A
filename that is expressed as
file://URL
is acceptable.
getFilename(docname)
string
Returns just the filename from
docname
,
which is expressed as
file://URL
. For
example,
Files.getFilename("file:///
work/logo.png")
returns
"logo.png"
.
getLanguageDirectory()
string
Returns the URL of the language
directory associated with the currently
running language.
Method
Data type
Notes
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...