Lua:Neutrino-API:empty:en: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Dbt (Diskussion | Beiträge) (Empty Funktion für en angelegt) |
Dbt (Diskussion | Beiträge) (commit aktualisiert) |
||
| Zeile 8: | Zeile 8: | ||
* The path points to a symbolic link whose target is not a regular file. | * The path points to a symbolic link whose target is not a regular file. | ||
* Access errors occur, e.g., missing permissions to read the file. | * Access errors occur, e.g., missing permissions to read the file. | ||
<br />''Return value: Boolean''|empty|(Parameter)|1.97| | <br />''Return value: Boolean''|empty|(Parameter)|1.97|409e21e78224283a43fa3898ea990ff4f9263902}} | ||
{{Lua_API_Funktion_Param_Kopf}} | {{Lua_API_Funktion_Param_Kopf}} | ||
Aktuelle Version vom 10. Juni 2024, 08:04 Uhr
empty
Checks if a file is empty. If it is a symbolic link, the linked file is evaluated.
Possible Error Conditions:
- The specified path does not exist.
- The path does not point to a regular file.
- A symbolic link points to a non-existent file.
- The path points to a symbolic link whose target is not a regular file.
- Access errors occur, e.g., missing permissions to read the file.
Return value: Boolean
| empty(Parameter) | ab API v1.97 - Neutrino Git |
Parameter:
| Parameter | Typ | Description/Beschreibung | |
| 1 | string | Object | Path to the file to be checked |
| en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
local fh = filehelpers.new()
-- Check if /tmp/info.txt is empty:
local x = fh:empty("/tmp/info.txt")
-- Return value true
|