files | ||||||||||
Type | function | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | List the files in a folder. | |||||||||
Introduced | 1.0 | |||||||||
Changes | The long form was introduced in version 1.1.
The optional targetFolder argument for the function call form was
introduced in version 8.1.
The | |||||||||
OS | mac, windows, linux, ios, android, web | |||||||||
Platforms | desktop, server, mobile | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Property: defaultFolder, umask Constant: return Keyword: long Command: sort Function: folders, specialFolderPath, URLDecode, textDecode Glossary: alias, current folder, data fork, folder, function, platform, return, resource fork, shortcut, symbolic link | |||||||||
Security | disk | |||||||||
Description | Return a list of files in the targetFolder, with one file per line. If no targetFolder is specified, list the files in the current folder. Folders are not included in the list. To get a list of folders, use the folders function. Aliases (on OS X systems), symbolic links|symbolic links (on Linux systems) and shortcuts (on Windows systems) are included in the list only if they refer to a file. Note: The order that files are listed is platform-dependent. The order may vary between platforms, between filesystems, and even between consecutive calls to the files function. If you need a sorted list, use the sort command. Short formWhen the files is called as a function, or without the Note: On some platforms, file names are permitted to include the linefeed character. Such a file name would be split across more than one line of the string returned by the files function. Long form
Each line in the return value is a comma-separated list of file attributes, as follows:
Any attribute that is not relevant to the current platform is left empty. The access permissions consist of three octal digits, in the same form used for the umask property. Note: On Windows, the permissions are always reported as "777". | |||||||||
Tags | file system |