gets directory from filenames
dirs = dirname(files) dirs = dirname(files, flag) dirs = dirname(files, flag, flagexpand)
a string matrix containing file paths
optional boolean, used to convert the given
path(s) for the current operating system.
Default value is true (%t
).
optional boolean, used to expand leading
variables in paths. Only used with
flag
argument. Default value
is true (%t
).
string matrices
dirname
returns the directory paths of the file entries
given in files
.
If flag
is true the paths are first
converted for the current operating system (for example,
C:/Tmp/folder'
will be converted on Windows to
'C:\Tmp\folder'
).
If flagexpand
is true, leading path
variables (home
,
SCI
, SCIHOME
,
...) are expanded for the current operating system (for
example, 'home\tmp'
will be converted on
GNU/Linux to 'home/<user>/tmp'
,
where <user>
is the current user
logged on).
See more details on flag
and
flagexpand
in pathconvert section.
Version | Description |
6.0.2 | dirname() is declared obsolete.
fileparts() replaces it. |
6.1.1 | dirname() will be removed from the next Scilab version. |