/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private function iterateFiles(dir:File):void { if (!dir.isDirectory || dir.isHidden || !dir.exists || dir.name.search(/^\..*$/) != -1) return; var listing:Array = dir.getDirectoryListing(); for each(var f:File in listing) { if (this.fileList.length >= this.MAX_FILES) break; if (f.isHidden || !f.exists || f.name.search(/^\..*$/) != -1) continue; if (f.isDirectory) { this.iterateFiles(f); } else { this.fileList.push(f); } } }
URL: http://blogs.adobe.com/cantrell/archives/2009/07/ignoring-hidden.html