realpath
Versione 1.0.0.0 (1,63 KB) da
Anthony Corr
Resolves relative paths and extra filesep characters in the input.
Updated version of realpath by M MA using suggestions made on that file submission and additional testing. Works for Windows, may need some tweaks for Unix. Substantially faster than original version in testing.
Resolves relative paths and extra filesep characters in the input.
Syntax:
OUTPUT = REALPATH(THEPATH)
where THEPATH is the path to a file or folder, which should exist.
Example:
realpath('../myfile.txt');
% returns /home/user/whatever/myfile.txt
Cita come
Anthony Corr (2026). realpath (https://it.mathworks.com/matlabcentral/fileexchange/26360-realpath), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2009b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Search Path in Help Center e MATLAB Answers
Tag
Riconoscimenti
Ispirato da: realpath
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
