User Guide
22 The Fireworks Object Model
rename(docname,
newPlainFilename)
string, string The docname argument is a file path or a
file URL to the file that you want to
rename.
The
newPlainFilename argument is the
new name to assign to the file.
The
rename method returns a URL path
of the newly renamed file if successful;
otherwise Fireworks returns
null.
setFilename(docname,
newPlainFilename)
string, string The first argument must be expressed
as file://URL. Returns a file URL with
docname replaced by newPlainFilename.
For example,
Files.setFilename("file:///work/
logo.png", "oldlogo.png")
returns
"file:///work/oldlogo.png". This
method does not affect the file on disk;
it simply provides a convenient way to
manipulate file URLs. To change the
name on disk, use
rename().
swap(docname1, docname2)
string, string Each argument must be expressed as a
file://URL. Swaps the contents of the
two specified files, so that each file
contains the contents of the other file.
Only files (not directories) can be
swapped, and both files must reside on
the same drive. Returns
true if the swap
is successful;
false otherwise.
Method Data type Notes