Zhamao Framework 3.2.4
A high-performance chatbot + web framework
载入中...
搜索中...
未找到
FileSystem类 参考

静态 Public 成员函数

static scanDirFiles (string $dir, bool $recursive=true, bool|string $relative=false, bool $include_dir=false)
 
static isRelativePath (string $path)
 
static createDir (string $path)
 
static ensureFileWritable (string $phar_path)
 
static getReloadableFiles ()
 
static getClassesPsr4 (string $dir, string $base_namespace, mixed $rule=null, bool|string $return_path_value=false)
 

成员函数说明

◆ createDir()

static createDir ( string  $path)
static

创建目录(如果不存在)

参数
string$path目录路径
异常
FileSystemException

◆ ensureFileWritable()

static ensureFileWritable ( string  $phar_path)
static

调用该方法将确认传入的文件是否可写,如果不可写将抛出 FileSystemException 异常。

异常
FileSystemException

◆ getClassesPsr4()

static getClassesPsr4 ( string  $dir,
string  $base_namespace,
mixed  $rule = null,
bool|string  $return_path_value = false 
)
static

使用Psr-4标准获取目录下的所有类

参数
string$dir目录
string$base_namespace基础命名空间
null | mixed$rule规则
bool | string$return_path_value是否返回文件路径,返回文件路径的话传入字符串
返回
string[]
函数调用图:

◆ getReloadableFiles()

static getReloadableFiles ( )
static

在工作进程中返回可以通过reload重新加载的php文件列表

返回
string[]|string[][]

◆ isRelativePath()

static isRelativePath ( string  $path)
static

检查路径是否为相对路径(根据第一个字符是否为"/"来判断)

参数
string$path路径
返回
bool 返回结果
自从
2.5

◆ scanDirFiles()

static scanDirFiles ( string  $dir,
bool  $recursive = true,
bool|string  $relative = false,
bool  $include_dir = false 
)
static

递归或非递归扫描目录,可返回相对目录的文件列表或绝对目录的文件列表

参数
string$dir目录
bool$recursive是否递归扫描子目录
bool | string$relative是否返回相对目录,如果为true则返回相对目录,如果为false则返回绝对目录
bool$include_dir非递归模式下,是否包含目录
自从
2.5
函数调用图:

该类的文档由以下文件生成: