I'm trying to use the getFiles method to make a list of folders and choose the last one modified. I understand that fileorfolderObject.modified() churns out a Date object which I can use, but I can't figure out how to make the getFile method to choose folders only.
The adobe guides specifies:
Which is what I should be doing but can't figure out the syntax; right now I have:[mask]
Can also be the name of a function that takes a File or Folder object as its argument.
It is called for each file or folder found in the search; if it returns true, the object is added
to the return array.
Code: Select all
function returnFolderArray(location){
fold = new Folder(location.toString());
foldArray = fold.getFiles[b](function(){if (this instanceof File){return false}})
return foldArray;
}
Thanks for your time!
edit: well, it looks like i'm getting even more problems when I try to use the .modified() method; why does the debugger tell me that
Function Date is undefined
with this code:
Code: Select all
alert(typeof returnFolderArray(newLocation)[0].modified()));