Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
pathconvert
POSIXおよびwindowsの間でパス名を変換.
呼び出し手順
paths = pathconvert(paths) paths = pathconvert(paths, flagtrail) paths = pathconvert(paths, flagtrail, flagexpand) paths = pathconvert(paths, flagtrail, flagexpand, type)
パラメータ
- paths
 パス名を指定する文字列行列
- flagtrail
 オプションの論理値パラメータ.デフォルト値は TRUE.
- flagexpand
 オプションの論理値パラメータ. デフォルト値はMSDOS変数に依存.
- type
 文字列
'u'または'w'.
説明
pathconvert は,
            (文字列行列 pathsで指定した)
            パス名の集合を
            windowsネーティブなファイル名からPOSIX形式のファイル名に変換したり,
            戻すことができます.
            変換後の形式はオプションの文字列typeで指定でき,
            Unixの場合は 'u',Windowsの場合は'w'
            を指定できます.
            デフォルトの形式はgetos() == "Windows"の値に基づき設定されます.
            getos() == "Windows"が TRUE (またはFALSE) の場合,
            デフォルトの形式は 'w' (または 'u')となります.
name:で始まる
            Windows のパス名は cygwinの表記法に基づき
            /cygdrive/name/で始まるパス名に変換されます.
flagtrail はオプションの論理値パラメータです.
            その値をTRUE (デフォルト値)にした時,
            末尾セパレータ
            ('\' または '/')
            が抜けている場合にパスの最後に追加されます.
            flagtrail が FALSE に設定されている場合,
            末尾セパレータは削除されます.
flagexpand はオプションの論理値パラメータです.
            この値が TRUEの場合,
            HOME, SCI または ~
            のような先頭文字列は環境変数により展開されます.
例
pathconvert("SCI/modules/fileio\macros/foo.sci",%f,%f,"u") pathconvert("SCI/modules/fileio\macros/foo.sci",%f,%f,"w") pathconvert("SCI/modules/fileio/macros/foo.sci",%f,%t,"w") pathconvert("HOME/modules/fileio/macros/foo.sci",%t,%t,"w") pathconvert("c:/tmp",%f,%t,"u") pathconvert("/cygdrive/c/tmp",%f,%f,"w")
履歴
| バージョン | 記述 | 
| 5.2.0 | flagtrail=%f now removes existing trailing "/" or "\" separators. | 
| Report an issue | ||
| << is_absolute_path | Paths - Filenames | pathsep >> |