16 lines
623 B
Text
16 lines
623 B
Text
function pathsForDirectoryAndWildcardPattern pDirectory, pWildcardPattern
|
|
-- returns a return-delimited list of long file names
|
|
-- the last character in the list is a return, unless the list is empty
|
|
|
|
filter files(pDirectory) with pWildcardPattern
|
|
repeat for each line tFile in it
|
|
put pDirectory & slash & tFile & cr after tPaths
|
|
end repeat
|
|
|
|
filter folders(pDirectory) without ".."
|
|
repeat for each line tFolder in it
|
|
put pathsForDirectoryAndWildcardPattern(pDirectory & slash & tFolder, pWildcardPattern) after tPaths
|
|
end repeat
|
|
|
|
return tPaths
|
|
end pathsForDirectoryAndWildcardPattern
|