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

    Hiding a directory

    vivoices
      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.

      <AS>
      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
      .nativePath;
      tempDir.space = rootDirs .spaceAvailable;
      }
      }

      var td:File = new File();
      td = td.resolvePath(tempDir.path + "OrderData" + File.separator + "Test.txt");
      td.parent.createDirectory();
      }
      </AS>

      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?

      Thanks,
      David