Home /Modules/impl/PATHS_OS.md

PATHS_OS.md

impl/PATHS_OS.md · 37 line(s) · markdown

SLeeLa Paths and Filesystem OS Layer

The SLeeLa paths/filesystem layer makes common path and filesystem operations predictable across Linux/POSIX and Windows/Win32.

API

core/sleela_path.h / core/sleela_path.c provide:

The public API uses ordinary UTF-8 C strings and hides platform-specific headers and system calls from callers.

Platform behavior

Linux uses POSIX filesystem calls and / as the native separator. Windows uses Win32/CRT calls and \\ as the native separator. Both / and \\ are accepted as input separators and normalized to the native separator.

The abstraction is deliberately small. It is intended to become the common boundary for VM/runtime path handling rather than allowing platform-specific filesystem calls to spread through the SLeeLa core.

Verification

The standalone smoke test is core/path_platform_smoke.c and is built by the implementation Makefile as test-path-platform.

The existing SHA-256 verification gate remains a prerequisite for object creation and therefore for this test as well.

Migration rule

New cross-platform SLeeLa code should use sleela_path.h instead of directly calling platform-specific path/filesystem APIs. Existing VM filesystem calls can be migrated incrementally without changing the public SLeeLa path API.