tags:

views:

73

answers:

1

I want to create a folder structure through Flex or AIR... is it possible? I mean the Flex or AIR will receive the inputs on what the folders and file names will be and when i press create, it should create a directory structure...

It is possible in PHP through fileSystem, but i am not sure whether it is possible in FLex or AIR....

+3  A: 

If I understand the question you can definitely do this in AIR with the file classes. You'd have to do a bit of manual coding, but you can use the createDirectory() method for that. Here are the livedocs and the example - http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html#createDirectory()

import flash.filesystem.*;

var source:File = File.desktopDirectory.resolvePath("test.txt");
var target:File = File.documentsDirectory.resolvePath("AIR Test/test.txt");
var targetParent:File = target.parent;
targetParent.createDirectory();
source.moveTo(target, true);

=Ryan

ryanstewart