Posted By

arpit on 07/23/09


Tagged

file AIR


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

thastyle


Ignoring Hidden Files in AIR


 / Published in: ActionScript 3
 

URL: http://blogs.adobe.com/cantrell/archives/2009/07/ignoring-hidden.html

  1. private function iterateFiles(dir:File):void
  2. {
  3. if (!dir.isDirectory || dir.isHidden || !dir.exists || dir.name.search(/^\..*$/) != -1) return;
  4. var listing:Array = dir.getDirectoryListing();
  5. for each(var f:File in listing)
  6. {
  7. if (this.fileList.length >= this.MAX_FILES) break;
  8. if (f.isHidden || !f.exists || f.name.search(/^\..*$/) != -1) continue;
  9. if (f.isDirectory)
  10. {
  11. this.iterateFiles(f);
  12. }
  13. else
  14. {
  15. this.fileList.push(f);
  16. }
  17. }
  18. }

Report this snippet  

You need to login to post a comment.