User Tools

Site Tools


uphp:functions:findfirst

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:findfirst [2017/04/06 11:56]
jeff
uphp:functions:findfirst [2021/09/13 05:57] (current)
Line 7: Line 7:
 ====Description==== ====Description====
  
-<well size="sm"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">array <span style="font-size:125%;color:green">array
-<span style="color:black"> +<span style="color:black">findfirst (
-</html> +
-[[findfirst]] ( +
-<html>+
 <span style="color:green">string <span style="color:green">string
 <span style="color:blue">$pattern<span style="color:black">, <span style="color:blue">$pattern<span style="color:black">,
Line 19: Line 15:
 <span style="color:blue">$attributes <span style="color:blue">$attributes
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 Begin a search to iterate through a list of files Begin a search to iterate through a list of files
Line 28: Line 23:
 <html><b><span style="color:blue">$pattern<span style="color:black"></b></html>:  Partial or full pattern such as *.* or *.cgi <html><b><span style="color:blue">$pattern<span style="color:black"></b></html>:  Partial or full pattern such as *.* or *.cgi
  
-<html><b><span style="color:blue">$attributes<span style="color:black"></b></html>:  Matching mask, leave at 255 to include all. See [[os:fat_file_system#attributes|FAT file attributes]] for more information.+<html><b><span style="color:blue">$attributes<span style="color:black"></b></html>:  Matching mask, leave at 255 to include all. See [[software:os:fat_file_system#attributes|FAT file attributes]] for more information.
  
-====Return Value====+====Return Values====
  
 <html><b><span style="color:green">Array<span style="color:black"></b></html> of the first matching file containing the following keys and values: <html><b><span style="color:green">Array<span style="color:black"></b></html> of the first matching file containing the following keys and values:
Line 36: Line 31:
 ^KEY^TYPE^VALUE^ ^KEY^TYPE^VALUE^
 |filename|<html><b><span style="color:green">string</b></html>|Name of the file| |filename|<html><b><span style="color:green">string</b></html>|Name of the file|
-|attributes|<html><b><span style="color:green">int</b></html>|[[os:fat_file_system#attributes|FAT file attributes]]|+|attributes|<html><b><span style="color:green">int</b></html>|[[software:os:fat_file_system#attributes|FAT file attributes]]|
 |filesize|<html><b><span style="color:green">int</b></html>|File size in bytes| |filesize|<html><b><span style="color:green">int</b></html>|File size in bytes|
-|timestamp|<html><b><span style="color:green">int</b></html>|[[os:fat_file_system#timestamps|FAT timestamp of last save]]|+|timestamp|<html><b><span style="color:green">int</b></html>|[[software:os:fat_file_system#timestamps|FAT timestamp of last save]]|
  
 ====Example==== ====Example====
  
-**List all files in the root directory:**+===List all files in the root directory===
  
 <code php> <code php>
Line 55: Line 50:
 </code> </code>
  
-====See Also====+====Also See====
  
 [[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 Linux timestamp+[[timefromfat()]] - Convert a FAT filetime to a Linux Timestamp
  
-[[strftime()]] - Format the passed time using the format <html><b><span style="color:green">string<span style="color:black"></b></html>+[[strftime()]] - Format a Linux Timestamp using format <html><b><span style="color:green">string</b></html>
  
-[[chdir()]] - Change uPHP'current directory+[[chdir()]] - Change the current directory
  
 [[file_exists()]] - Check if a file exists [[file_exists()]] - Check if a file exists
uphp/functions/findfirst.1491479772.txt.gz · Last modified: 2021/09/13 05:56 (external edit)