Adobe 65011817 Extended User Guide - Page 22
File Reference object
UPC - 883919157368
View all Adobe 65011817 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 22 highlights
Last updated 12/8/2009 EXTENDING FIREWORKS 18 The Fireworks Object Model Method Data type getTempFilePath ({dirname}) string isDirectory(dirname) string makePathFromDirAndFile(dirna string, string me, plainFilename) open(docname, encoding, bWrite) string, string, Boolean rename(docname, newPlainFilename) string, string setFilename(docname, newPlainFilename) string, string swap(docname1, docname2) string, string Notes The argument, if used, must be expressed as file://URL. Returns a file URL in the Temporary Files directory or in the specified directory. This method does not create a file; it simply returns a unique file URL that does not conflict with existing files in the directory. If dirname is passed and is not null, the URL that is returned indicates a file in the specified directory rather than in the Temporary Files directory. The argument must be expressed as file://URL. Returns true if the specified URL refers to a directory that exists; false otherwise. The first argument must be expressed as file://URL. Concatenates the two arguments to return a file URL that references the specified filename in the specified directory. For example, Files.makePathFromDirAndFile("file:///work/rep orts", "logo.png") returns "file:///work/reports/logo.png". The first argument must be expressed as file://URL. Opens the specified file for reading or writing. The second argument specifies the encoding. If the third argument is true, the file opens for writing; otherwise it opens for reading. If the file cannot be opened, returns null; otherwise, returns a File Reference object. 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. The first argument must be expressed as file://URL. Returns a file URL withdocname 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(). 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. File Reference object The File Reference object is used to refer to a specific open file. The following table lists the methods of the File Reference object, along with their data types and, where appropriate, acceptable values and notes.