Skip to main content

ファイル操作

isexists(dir,file)​

dir に file が存在するか

引数​

  • dir - ディレクトリ
  • file - ファイル名

返り値​

<bool>

makedir(path,dirname)​

path に dirname の dir を作成する。

引数​

  • path - パス
  • dirname - 作成するフォルダ名

Filelist([mainpath,]dirname)​

(mainpath にある)dirname のファイルとフォルダの一覧をリストとして返す。

引数​

  • mainpath - dirnameが位置する親フォルダのパス
  • dirname - 一覧を取得するフォルダ名

返り値​

<list>

Readlines([path,]filename)​

(path にある)filername の各行を読み込みリストとして返す。

引数​

  • path - filenameが位置するフォルダのパス。デフォルトはDirwork
  • filename - 行ごと取得するファイルの名前

返り値​

<list>

gethome()​

ユーザホームを返す。

返り値​

<string>

ismacosx()​

macOSかどうかを返す

返り値​

<bool>

iswindows()​

Windowsかどうかを返す

返り値​

<bool>

islinux()​

Linuxかどうかを返す

返り値​

<bool>