fs.is_file
fs.is_file
Function
Determine whether the path is an ordinary file.
Syntax
fs(path).is_file()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Bool | Returns true if it is a normal file, otherwise it returns false. |
Example
file = fs('docs-is-file.txt') file.write('BT') result = file.is_file() // Output: true print result
Notes
- Returns false if the path does not exist.