J.P.A.L.

 

extMask

Page history last edited by vietmusic 2 yrs ago

extMask

 

Given an array of file names, extMask will return an array of all the filenames with the given extension.

 

jpal.extMask(files,ext);

 

files is an array of file names

ext is the extension you're looking for. You can also specify a list of extensions with a | (vertical bar) delineated list.

 

Example:

 

var textFiles = jpal.extMask({"a.txt","b.jpg","c.text"},"txt|text");

 

textFiles will contain {"a.txt","c.text"}

Comments (0)

You don't have permission to comment on this page.