Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Files : Input/Output functions > listfiles

listfiles

ファイルのリスト

呼び出し手順

files= listfiles(paths [,flag,flagexpand])

パラメータ

paths

パス名の集合を指定する文字列の行列 (多くの場合, 末尾が * のパターンとなります)

flag,flagexpand

オプションの論理値パラメータ(デフォルト値 %t).

files

文字列の行列.

説明

listfiles は, パスエントリの指定したパターンのどれかに一致するファイル の一覧を得るために使用されます. パターンは,ファイルに関する情報を取得するために Unixではls,Windowsでは dirコマンドに指定されます. このため, ポータブルなScilabスクリプトを書くためには, 両方のOSに有効なワイルドカードパターンを指定する必要があります. パス名の変換が行われ,例えばSCI/core/macros/*.sci はUnixとWindowsの両方で有効なパターンであることに注意してください.

flag が真の場合,pathsで 指定したパス名は getos() == "Windows" の値に基づき変換されます (pathconvert参照). さらに, flagexpand が真の場合, HOME, SCI または ~ のような 先頭文字列は環境変数により展開されます.

files=listfiles(['SCI/modules/core/macros/*.sci';'SCI/modules/core/macros/*.bin']);

参照

  • findfiles — 指定した filespec を有する全てのファイルを見つける
  • basename — ファイル名からディレクトリと接尾辞を取り除く
  • pathconvert — POSIXおよびwindowsの間でパス名を変換.
Report an issue
<< isfile Files : Input/Output functions listvarinfile >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:18:58 CEST 2014