This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:filesize [2017/04/13 06:59] jeff |
uphp:functions:filesize [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 11: | Line 11: | ||
**Filename Form** - The syntax is the same as in mainline PHP, and uses a filename for the parameter: | **Filename Form** - The syntax is the same as in mainline PHP, and uses a filename for the parameter: | ||
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </ | + | |
- | [[filesize]] ( | + | |
- | < | + | |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
- | **Handle Form** - The syntax is unique to uPHP,((The Handle Form is more commonly used on the Wattmon. Compared to mainline PHP, this uPHP form is a much simpler method for retrieving the number of bytes pending in a stream. For examples of how much more complex mainline PHP can be, take a look at the PHP function [[http:// | + | **Handle Form** - The syntax is unique to uPHP,((The Handle Form is more commonly used on the [[hardware: |
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </ | + | |
- | [[filesize]] ( | + | |
- | < | + | |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
The Handle Form works in different ways, depending on the type of resource. For streams, sockets and ports it will return the number of unread bytes in the receive buffer. For files it will return the total number of bytes in the file.((I haven' | The Handle Form works in different ways, depending on the type of resource. For streams, sockets and ports it will return the number of unread bytes in the receive buffer. For files it will return the total number of bytes in the file.((I haven' | ||
Line 47: | Line 37: | ||
< | < | ||
- | ====Return | + | ====Return |
< | < | ||
Line 53: | Line 43: | ||
====Examples==== | ====Examples==== | ||
- | ===Filename Form, output the size of the System Log:=== | + | ===Filename Form, output the size of the System Log=== |
<code php> | <code php> | ||
Line 62: | Line 52: | ||
</ | </ | ||
- | ===Handle Form, for a file, output the file size:=== | + | ===Handle Form, for a file, output the file size=== |
<code php> | <code php> |