- Scilab help
 - Files : Input/Output functions
 - basename
 - chdir
 - copyfile
 - createdir
 - deletefile
 - dir
 - dirname
 - dispfiles
 - fileext
 - fileinfo
 - fileparts
 - filesep
 - findfiles
 - fprintf
 - fprintfMat
 - fscanf
 - fscanfMat
 - fullfile
 - fullpath
 - get_absolute_file_path
 - getdrives
 - getlongpathname
 - getrelativefilename
 - getshortpathname
 - %io
 - isdir
 - isfile
 - listfiles
 - listvarinfile
 - ls
 - maxfiles
 - mclearerr
 - mclose
 - mdelete
 - meof
 - merror
 - mfprintf
 - mscanf
 - mget
 - mgetl
 - mgetstr
 - mkdir
 - mopen
 - movefile
 - mput
 - mputl
 - mputstr
 - mseek
 - mtell
 - newest
 - pathconvert
 - pathsep
 - pwd
 - removedir
 - rmdir
 - save_format
 - scanf
 - scanf_conversion
 - sscanf
 
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
dir
ファイル一覧を取得する
呼び出し手順
dir path S=dir([path])
パラメータ
- path
 ディレクトリpathnameを指定する文字列行列 (
*を含むパターンで終わる場合もあります). デフォルト値は.です.- S
 dir型のtlistで 以下のフィールドを有します :name,dateおよびisdir
説明
dir は path 引数により指定したパターンに
	一致するファイルを取得するために使用することができます.
	パターンは,ファイルに関する情報を取得するために,
	 unix ls または
 	Windows dir コマンドに指定されます.
	よって, ポータブルな Scilab スクリプトを書くためには,
	両方のOSで有効なワイルドカードパターンを指定する必要があります.
	pathname 変換が行われるため,
	例えば, SCI/modules/core/macros/*.sci は
	unix および windows の両方で有効なパターンとなることに注意してください.
戻り値の変数のname フィールドファイル名の
	列ベクトルです.
戻り値の
      date フィールドは, 1970年1月1日からの積算日でコード化された
	直近の修正日を含む整数の列ベクトルです.
戻り値の変数のフィールドisdirは,
	対応する名前がディレクトリの場合に true となる
	論理値の列ベクトルです.
デフォルトで表示される戻り値の構造はファイルの整形済みの列です.
	これは,関数%dir_pを再定義することにより変更することが可能です.
例
参照
| << deletefile | Files : Input/Output functions | dirname >> |