Difference between revisions of "ObjectType:filelist"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
echo File #${Count} = ${TestFileList.File[${Count}].Filename} | echo File #${Count} = ${TestFileList.File[${Count}].Filename} | ||
} | } | ||
+ | |||
+ | |||
+ | == Operates On == | ||
+ | <tt>CFileList *</tt> | ||
+ | |||
+ | <small>This is an internal data type</small> | ||
+ | |||
== See Also == | == See Also == | ||
* [[DataType:filelistentry|filelistentry]] | * [[DataType:filelistentry|filelistentry]] |
Revision as of 22:16, 15 December 2005
Description
This data type allows finding files and directories.
Members
- int Files: Total file count
- filelistentry File[#]: The filelistentry of file <#>
Methods
- GetFiles[*]: Gets all files from the given directory. (Defaults to current directory and * for files.)
- GetDirectories[*]: Gets all directories from the given directory. (Defaults to current directory)
- Reset: Clears the filelist.
- Note GetFiles and GetDirectories does NOT clear the filelist.
Returns
none
Examples
declare Count int 0 declare TestFileList filelist declare TestDirList filelist declare ScanDirectory filepath script ${LavishScript.CurrentDirectory} TestFileList:GetFiles[${ScanDirectory}/*.txt] TestDirList:GetDirectories[${ScanDirectory}] ScanDirectory:Set[${ScanDirectory.File[1].FullPath}] TestFileList:GetFiles[${ScanDirectory}/*.txt] while (Count:Inc<=${TestFileList.Files}) { echo File #${Count} = ${TestFileList.File[${Count}].Filename} }
Operates On
CFileList *
This is an internal data type