Can you write to the file system from flex? : adobe flex action script
Answer / Ramendra Kumar Katiyar
Yes, you can write to the file system in Flex using File API. Here's an example of writing a text file:
```actionscript
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
var myFile:File = File.documentsDirectory.resolvePath("myFile.txt");
var fileStream:FileStream = new FileStream();
fileStream.open(myFile, FileMode.WRITE);
fileStream.writeUTFBytes("Hello Flex!");
fileStream.close();
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Difference between label and text?
State the difference between view stack and view state?
How do I get flex to query my database? : adobe flex action script
What is calllater() method?
Explain about blaze ds and blaze ds services?
Why is disable auto update method used?
I am going to add images into a tag. How will it resize itself in adobe flex actionscript? : adobe flex action script
Explain how binding works in mxml components in flex?
What is cairnghorm in flex? How do we use it?have you worked with cairnghorn in flex?
Can we use text input/editable component as itemrenderer?
Where can I get access to the open source flex project information?
Why do strongly typed objects appear as "undefined" in the netconnection debugger? : adobe flex action script