| 1 |
// SPDX-License-Identifier: MPL-2.0 |
| 2 |
// (c) Hare authors <https://harelang.org> |
| 3 |
|
| 4 |
use rt; |
| 5 |
|
| 6 |
// Platform-specific path separator byte. |
| 7 |
export def SEP: u8 = '/'; |
| 8 |
|
| 9 |
const sepstr: str = "/"; |
| 10 |
|
| 11 |
// Maximum length of a file path which can be stored in a [[path::buffer]]. On |
| 12 |
// many platforms (including Linux), this is also the maximum supported path |
| 13 |
// length for syscalls (excluding the terminating NUL byte). |
| 14 |
// |
| 15 |
// Note that the actual maximum length for absolute paths (if such a limit |
| 16 |
// exists at all) is dependent on the filesystem implementation, and may not be |
| 17 |
// a constant value. |
| 18 |
export def MAX = rt::PATH_MAX - 1; |