<< CL_deg2sdms Utilities CL_g_delete >>

celestlab >> Utilities > CL_fileparts

CL_fileparts

Path, filename, extension of a file path

Calling Sequence

[path, fname, extension] = CL_fileparts(fullpath)
value = CL_fileparts(fullpath, sel)

Description

Parameters

fullpath:

(string) Full path. (1xN)

sel:

(string, optional) selection : "path", "fname" or "extension". (1x1)

path:

(string) Path of directory (1xN)

name:

(string) Name of file (1xN)

extension:

(string) Extension of the file (1xN)

Authors

Examples

// Elements of a file paths
[path, fname, ext] = CL_fileparts("directory/readme.txt")

// Directory part
path = CL_fileparts("directory/name", "path")
path = CL_fileparts("directory/name/", "path") // => same

Report an issue
<< CL_deg2sdms Utilities CL_g_delete >>