PathCompatibilityProfile
The naming rules of one platform.
Import:
import type { PathCompatibilityProfile } from '@mnaoumov/obsidian-lib/path-compatibility';Signature:
export interface PathCompatibilityProfileProperties
| Property | Type | Description |
|---|---|---|
| hasWindowsNamingRules | boolean | Whether this platform applies Windows' naming rules: its forbidden characters, its reserved device names, and its rejection of trailing dots and spaces. One flag for three rules because they are one filesystem's rules, and no platform adopts a subset. |
| maxFilePathLength | number | The longest absolute path a file may have, in this profile's unit. |
| maxFolderPathLength | number | The longest absolute path a folder may have, in this profile's unit. Below PathCompatibilityProfile.maxFilePathLength on Windows, where the shorter budget leaves room for an 8.3 name inside the folder. |
| maxNameLength | number | The longest single name — one path segment — in this profile's unit. |
| platform | PathCompatibilityPlatform | The platform this profile describes. |
| shouldMeasureInBytes | boolean | Whether lengths count UTF-8 bytes (ext4, APFS) rather than UTF-16 units (NTFS). This is the whole reason the 255 limit is not a character count: a name of 128 CJK characters is 384 bytes and is rejected by ext4 while being nowhere near any limit Windows has. |