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