This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
uphp:functions:findfirst [2017/03/06 12:44] jeff |
uphp:functions:findfirst [2021/09/13 05:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======findfirst====== | ======findfirst====== | ||
| + | |||
| < | < | ||
| Line 5: | Line 6: | ||
| ====Description==== | ====Description==== | ||
| - | <well size=" | + | |
| - | <span style=" | + | <well size=" |
| - | < | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| + | <span style=" | ||
| </ | </ | ||
| Line 18: | Line 20: | ||
| ====Parameters==== | ====Parameters==== | ||
| - | < | ||
| - | < | + | <html><b>< |
| - | ====Return | + | < |
| - | Array of the first matching file containing the following keys and values: | + | |
| + | ====Return | ||
| + | |||
| + | < | ||
| ^KEY^TYPE^VALUE^ | ^KEY^TYPE^VALUE^ | ||
| - | |filename|< | + | |filename|< |
| - | |attributes|< | + | |attributes|< |
| - | |filesize|< | + | |filesize|< |
| - | |timestamp|< | + | |timestamp|< |
| ====Example==== | ====Example==== | ||
| - | List all files in the root directory: | + | |
| + | ===List all files in the root directory=== | ||
| <code php> | <code php> | ||
| < | < | ||
| - | chdir("/" | + | |
| - | $arr=findfirst(" | + | $arr=findfirst(" |
| - | while ($arr) { | + | while ($arr) { |
| - | print($arr[' | + | print($arr[' |
| - | $arr=findnext(); | + | $arr=findnext(); |
| - | } | + | } |
| ?></ | ?></ | ||
| </ | </ | ||
| - | ====See Also==== | + | ====Also |
| [[findnext()]] - Return next matching file information (after a findfirst) | [[findnext()]] - Return next matching file information (after a findfirst) | ||
| - | [[timefromfat()]] - Convert a FAT filetime to a native | + | [[timefromfat()]] - Convert a FAT filetime to a Linux Timestamp |
| - | [[strftime()]] - Format | + | [[strftime()]] - Format |
| - | [[chdir()]] - Change | + | [[chdir()]] - Change |
| [[file_exists()]] - Check if a file exists | [[file_exists()]] - Check if a file exists | ||
| - | [[filesize()]] - Return the size of a file, or the number of unread bytes in a stream | + | [[filesize()]] - Return the size of a file, or the number of unread bytes in a stream |
| - | + | ||
| - | [[uphp: | + | |