getfullpath

版本 1.0.0.0 (1.4 KB) 作者: Luca Cerone
getfullpath reconstructs the full path to a folder or file starting from its relative path.
217.0 次下载
更新时间 2012/9/17

查看许可证

getfullpath reconstructs the full path to a folder or file starting from
its relative path.
It has been tested on Linux, but it should work on Windows and Mac as
well.

Syntax:
fpath=getfullpath(relative_file_or_dir_name)

Example 1:
(assuming to be in /home/user/Documents/Matlab)

fpath = getfullpath('../../Music/')

fpath =

/home/user/Music/

Example 2:
(assuming to be in /home/user/Documents/Matlab)

fpath=getfullpath('../../Music/Song.mp3')

fpath =

/home/user/Music/Song.mp3

引用格式

Luca Cerone (2024). getfullpath (https://www.mathworks.com/matlabcentral/fileexchange/38214-getfullpath), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 File Operations 的更多信息
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0