fs.is_absolute
fs.is_absolute
Function
Determine whether the current path is an absolute path.
Syntax
fs(path).is_absolute()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Bool | Returns true for an absolute path, false otherwise. |
Example
file = fs('demo.txt') result = file.is_absolute() // Output: false print result
Notes
- The judgment is based on the path text itself and does not require the existence of the path.