• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 27. Extending Flash > File I/O in JSFL

File I/O in JSFL

Introduced after the launch of Flash MX 2004, File I/O was one of the most requested features to be added to JSFL. A specific class, called Flfile, was created to handle this new feature. Flfile has several methods, but we are going to be using three for our example, the exists method, the remove method, and the write method. Here are those three methods with some explanation:

  • exists (fullPath)— This method checks to see if the file in the fullPath parameter exists; it returns a Boolean value true if the file does exist and false if the file does not exist.

  • remove (fullPath)— This method completely removes the file at fullPath and returns a Boolean value based on its success.

  • write (fullPath, stringContent)— This method creates a file at fullPath and fills it with the stringContent.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint