baserCMS クラスリファレンス

BcFolder
in package
uses LogTrait

Class BcFolder

Table of Contents

Properties

$mode  : int
権限
$_errors  : array<string|int, mixed>
Holds errors from last method.
$_messages  : array<string|int, mixed>
Holds messages from last method.
$path  : string
パス

Methods

__construct()  : mixed
Constructor
chmod()  : bool
ディレクトリ構造のモードを再帰的に変更します。これにはファイルのモードも変更することが含まれます。
copy()  : bool
ディレクトリをコピーする
create()  : bool
ディレクトリを作成する
delete()  : mixed
ディレクトリを再帰的に削除する
find()  : array<string|int, mixed>
getFiles()  : array<string|int, mixed>
ディレクトリ内のファイル一覧を取得する
getFolders()  : array<string|int, mixed>
ディレクトリ内のフォルダ一覧を取得する
getPath()  : string
パスを取得する
move()  : bool
ディレクトリを移動する
pwd()  : string
パスを取得する
read()  : array<string|int, mixed>
フォルダ内のファイルとフォルダを読み込む
tree()  : array<string|int, mixed>
各ディレクトリ内のネストされたディレクトリとファイルの配列を返す

Properties

$_errors

Holds errors from last method.

protected array<string|int, mixed> $_errors = []

$_messages

Holds messages from last method.

protected array<string|int, mixed> $_messages = []

Methods

__construct()

Constructor

public __construct([string $path = '' ]) : mixed
Parameters
$path : string = ''
Tags
checked
noTodo
unitTest

chmod()

ディレクトリ構造のモードを再帰的に変更します。これにはファイルのモードも変更することが含まれます。

public chmod([int|null $mode = null ][, bool $recursive = true ][, array<string|int, mixed> $exceptions = [] ]) : bool
Parameters
$mode : int|null = null
$recursive : bool = true
$exceptions : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
bool

copy()

ディレクトリをコピーする

public copy(mixed $dest[, mixed $mode = 0777 ]) : bool
Parameters
$dest : mixed
$mode : mixed = 0777
Tags
checked
noTodo
unitTest
Return values
bool

create()

ディレクトリを作成する

public create([int|string $mask = 0777 ]) : bool
Parameters
$mask : int|string = 0777
Tags
checked
noTodo
unitTest
Return values
bool

delete()

ディレクトリを再帰的に削除する

public delete([mixed $path = '' ]) : mixed
Parameters
$path : mixed = ''
Tags
checked
noTodo
unitTest

find()

public find([string $regexpPattern = '.*' ]) : array<string|int, mixed>
Parameters
$regexpPattern : string = '.*'
Return values
array<string|int, mixed>

getFiles()

ディレクトリ内のファイル一覧を取得する

public getFiles([array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getFolders()

ディレクトリ内のフォルダ一覧を取得する

public getFolders([array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed> = []
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

getPath()

パスを取得する

public getPath() : string
Tags
checked
noTodo
unitTest
Return values
string

move()

ディレクトリを移動する

public move(string $dest[, mixed $options = [] ]) : bool
Parameters
$dest : string
$options : mixed = []
Tags
checked
noTodo
unitTest
Return values
bool

pwd()

パスを取得する

public pwd() : string
Tags
checked
noTodo
Return values
string

read()

フォルダ内のファイルとフォルダを読み込む

public read([mixed $sort = true ][, bool $exceptions = false ][, bool $fullPath = false ]) : array<string|int, mixed>

since 5.1.0 後方互換用

Parameters
$sort : mixed = true

利用不可

$exceptions : bool = false

利用不可

$fullPath : bool = false
Return values
array<string|int, mixed>

tree()

各ディレクトリ内のネストされたディレクトリとファイルの配列を返す

public tree([string|null $path = null ][, mixed $exceptions = false ][, string|null $type = null ]) : array<string|int, mixed>
Parameters
$path : string|null = null
$exceptions : mixed = false
$type : string|null = null
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

        
On this page

Search results