Class: Teeple_FileUtil

Source Location: /FileUtil.php

Class Overview [line 23]


ディレクトリ・ファイル操作クラス

Author(s):

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

ディレクトリ・ファイル操作クラス

[ Top ]


Class Variables


Class Methods

append

boolean append( string $fileName, string $buf)

[line 82]

ファイルに追記する

指定した内容をファイルに追記で書き込む。 途中のフォルダが存在しない場合は自動的に作成する。

Tags:

  • access - public

Parameters:

  • string $fileName - ファイル名
  • string $buf - 書き込む内容

[ Top ]

find

array find( string $dirName, [string $regex = ""])

[line 195]

指定したディレクトリのファイルリストを取得する

Tags:

  • return - ファイルの配列
  • access - public

Parameters:

  • string $dirName - ディレクトリ名
  • string $regex - [$regex] 取得するファイル名の正規表現

[ Top ]

findIncludableFile

String findIncludableFile( $path)

[line 33]

include_pathからファイルを検索し、絶対パスの形で返す 見つからなかった場合はfalseを返す

Tags:

Parameters:

  • $path -

[ Top ]

findRecursive

array findRecursive( string $dirName, [string $regex = ""])

[line 225]

指定したディレクトリのファイルリストを取得する

サブディレクトリがある場合は再帰的に取得する

Tags:

  • return - ファイルの配列
  • access - public

Parameters:

  • string $dirName - ディレクトリ名
  • string $regex - [$regex] 取得するファイル名の正規表現

[ Top ]

ls

array ls( string $dirName)

[line 165]

ディレクトリとファイルのリストを取得する

返値は配列で、最初がディレクトリの配列、次にファイルの配列となる。 list($dirs, $files) = self::ls($dirname);

Tags:

  • return - ディレクトリとファイルの配列
  • access - public

Parameters:

  • string $dirName - ディレクトリ名

[ Top ]

makeDir

void makeDir( mixed $dirNames)

[line 124]

ディレクトリを作成する。

複数階層のディレクトリを指定した場合に、 途中のディレクトリも自動的に作成する。

Tags:

  • access - public

Parameters:

  • mixed $dirNames - 作成するディレクトリ名、またはその配列

[ Top ]

read

string read( string $fileName)

[line 56]

ファイルを読み込む

ファイルを読み込んで一つの文字列として返す。

Tags:

  • return - ファイルの内容
  • access - public

Parameters:

  • string $fileName - ファイル名

[ Top ]

removeDir

void removeDir( mixed $dirNames)

[line 144]

ディレクトリを削除する

指定したディレクトリより下のディレクトリ・ファイルも 自動的に削除する。

Tags:

  • access - public

Parameters:

  • mixed $dirNames - 削除するディレクトリ名、またはその配列

[ Top ]

write

boolean write( string $fileName, string $buf, [string $mode = "wb"])

[line 99]

ファイルに書き込む

指定した内容をファイルに上書きで書き込む。 途中のフォルダが存在しない場合は自動的に作成する。

Tags:

  • access - public

Parameters:

  • string $fileName - ファイル名
  • string $buf - 書き込む内容
  • string $mode - 書き込みモード

[ Top ]


Class Constants


Documentation generated on Mon, 26 Apr 2010 08:59:47 +0900 by phpDocumentor 1.4.3