Search guides and the APICtrl K
  1. API reference
  2. Files and codecs

path_io.h

Opening files by UTF-8 path, on every platform.

#include <sonore/path_io.h>
  • 10other declarations
On this page

Design notes

Every path in this SDK is UTF-8: what the file dialog returns, what files.h lists, what a plugin saves in its state. On macOS and Linux the C library agrees. On Windows it does not -- fopen, remove, rename and _mkdir read their argument in the ANSI code page -- so a path through a folder called "José" named a different file, and one through "Музыка" or "音楽" named nothing at all: a sample that would not load, a recording that could not be written, a settings file silently never saved, for exactly the users whose names or languages are not English.

These are the C library's own calls, with the path converted at the edge. Deliberately free of <windows.h>: wav.h and friends include this, and a header that writes a WAV file should not drag the Windows API in to do it.

Functions 10

↑↓ to move↵ to openEvery public name in the headers, and every guide