vivoices
01-20-2009, 10:33 AM
Hi,
I am developing an AIR application on FlexBuilder 3 with the latest Gumbo SDK installed.
One of my functions searches for the HDD with the most available space on the users system and creates a working directory there.private function createTempDir():void {
// get Root Dirs
var rootDirs:Array = File.getRootDirectories();
var tempDir:Object = new Object();
tempDir.path = rootDirs[0].nativePath;
tempDir.space = rootDirs[0].spaceAvailable;
for ( var i:uint = 1; i < rootDirs.length; i++ ) {
if ( rootDirs[i].spaceAvailable > tempDir.space ) {
tempDir.path = rootDirs[i].nativePath;
tempDir.space = rootDirs[i].spaceAvailable;
}
}
var td:File = new File();
td = td.resolvePath(tempDir.path + "OrderData" + File.separator + "Test.txt");
td.parent.createDirectory();
}I want to hide the working directory, so a user cannot easily mess with it.
Any ideas how to set the directory's attribute to "hidden" or even "hidden" and "system"?
Thanks,
David
I am developing an AIR application on FlexBuilder 3 with the latest Gumbo SDK installed.
One of my functions searches for the HDD with the most available space on the users system and creates a working directory there.private function createTempDir():void {
// get Root Dirs
var rootDirs:Array = File.getRootDirectories();
var tempDir:Object = new Object();
tempDir.path = rootDirs[0].nativePath;
tempDir.space = rootDirs[0].spaceAvailable;
for ( var i:uint = 1; i < rootDirs.length; i++ ) {
if ( rootDirs[i].spaceAvailable > tempDir.space ) {
tempDir.path = rootDirs[i].nativePath;
tempDir.space = rootDirs[i].spaceAvailable;
}
}
var td:File = new File();
td = td.resolvePath(tempDir.path + "OrderData" + File.separator + "Test.txt");
td.parent.createDirectory();
}I want to hide the working directory, so a user cannot easily mess with it.
Any ideas how to set the directory's attribute to "hidden" or even "hidden" and "system"?
Thanks,
David