I need ActionScriot code that will parse a given folder and search it for .txt files. Any links or code samples will be helpful. (Adobe Flex 3.3/AIR)
Thanks, Sri
I need ActionScriot code that will parse a given folder and search it for .txt files. Any links or code samples will be helpful. (Adobe Flex 3.3/AIR)
Thanks, Sri
There:
var docs:File = File.documentsDirectory;
var dirs:Array = docs.getDirectoryListing();
var pdfFiles:String = "";
for(var i:int; i < dirs.length; i++)
{
var f:File = dirs[i] as File;
if(f.isDirectory || f.name.toLowerCase().lastIndexOf(".pdf") != f.name.length - 4)
continue;
pdfFiles += f.name + "\n";
}
txt.text = pdfFiles;