FileLists, like FileSets, are collections of files; however, a FileList is an explicitly defined list of files -- and the files don't necessarily have to exist on the filesystem.
Besides being able to refer to nonexistent files, another thing that
FileLists
allow you to do is specify files in a
certain order
. Files in FileSets
are ordered based
on the OS-level directory listing functions, in some cases you may want to specify a
list of files to be processed in a certain order -- e.g. when concatenating files
using the <append>
task.
<filelist dir="base/" files="file1.txt,file2.txt,file3.txt"/> <!-- OR: --> <filelist dir="basedir/" listfile="files_to_process.txt"/>