Scilab-Branch-6.1-GIT
      
      
    Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.
dirname
ファイル名からディレクトリを得る (obsolete)
呼び出し手順
dirs = dirname(files[,flag [,flagexpand]])
パラメータ
- files
- ファイル名の集合を指定する文字列行列. 
- flag, flagexpand
- オプションの論理値パラメータ. (デフォルト値 - %t).
- files, dirs
- 文字列行列. 
説明
|  | dirname(…)is obsolete and will be removed from Scilab 6.1.x.
          Please usefileparts(…)instead. | 
dirname は files で指定したファイルエントリの
            ディレクトリ名を返します.
flag が真の場合, files は
            getos() == 'Windows'変数で指定した目標型にまず
            変換されます.
            更に, flagexpand が真の場合,
            HOME, SCI または ~
            のような接頭文字列は環境変数を用いて展開されます.
dirname(files,%f) は,
            files に指定したパス名が
            getos() == 'Windows'変数により指定される変換に従わない
            場合に間違った結果を出力することがあるため,注意を要します.
例
dirs=dirname('SCI/modules/fileio/macros/poo.sci') dirs=dirname('SCI/modules\fileio/macros/poo.sci') dirs=dirname('SCI/modules\fileio/macros/poo.sci.k')
参照
- fileparts — ファイルパスのパス,ファイル名,拡張子を返す
- basename — ファイル名からディレクトリと接尾辞を取り除く
- listfiles — ファイルのリスト
- pathconvert — POSIXおよびwindowsの間でパス名を変換.
履歴
| バージョン | 記述 | 
| 6.0.2 | dirname() is tagged obsolete, to be removed from Scilab 6.1.x. fileparts() replaces it. | 
| Report an issue | ||
| << basename | Paths - Filenames | fileext >> |