treeScannerC/doc/max_path.md
Adam Skotarczak 4a9b5e77f3
v1.0.0
- C-Template für CLI Tools
2025-05-09 22:46:31 +02:00

29 lines
632 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MAX_PATH Maximale Pfadlänge (Windows)
Windows beschränkt Pfade klassisch auf **260 Zeichen**. Diese Grenze ist durch den Wert `MAX_PATH` definiert.
## Definition
```c
#define MAX_PATH 260
```
## Beispiel
```c
char path[MAX_PATH];
snprintf(path, MAX_PATH, "C:\\Ordner\\Datei.txt");
```
## Überlange Pfade
Seit Windows 10 (ab Build 1607) kann man **lange Pfade bis 32.767 Zeichen** aktivieren:
- Voraussetzung: UTF-16-Pfade mit `\?\`-Präfix
- Beispiel: `\\?\C:\SehrLangerPfad\Datei.txt`
## Hinweise
- Ohne `\?\` gelten weiterhin 260 Zeichen
- Einige Windows-APIs und ältere Programme brechen bei langen Pfaden ab