5 Replies Latest reply on Jan 21, 2009 8:39 AM by vivoices

    Hiding a directory

    vivoices Level 1
      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 .spaceAvailable > tempDir.space ) {
      tempDir.path = rootDirs
      tempDir.space = rootDirs .spaceAvailable;

      var td:File = new File();
      td = td.resolvePath(tempDir.path + "OrderData" + File.separator + "Test.txt");

      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"?

      Btw, how do I get my code to propperly display in this forum?