\app\common\library\storageDriver

存储模块驱动 Class driver

Summary

Methods
Properties
Constants
__construct()
setUploadFile()
setUploadFileByReal()
upload()
delete()
getError()
getFileName()
getFileInfo()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getEngineClass()
$config
$engine
N/A

Properties

$config

$config : 

Type

$engine

$engine : 

Type

Methods

__construct()

__construct(  $config, null|string  $storage = null) 

构造方法 Driver constructor.

Parameters

$config
null|string $storage

指定存储方式,如不指定则为系统默认

Throws

\think\Exception

setUploadFile()

setUploadFile(string  $name = 'iFile') : mixed

设置上传的文件信息

Parameters

string $name

Returns

mixed

setUploadFileByReal()

setUploadFileByReal(string  $filePath) : mixed

设置上传的文件信息

Parameters

string $filePath

Returns

mixed

upload()

upload() 

执行文件上传

delete()

delete(  $fileName) : mixed

执行文件删除

Parameters

$fileName

Returns

mixed

getError()

getError() : mixed

获取错误信息

Returns

mixed

getFileName()

getFileName() : mixed

获取文件路径

Returns

mixed

getFileInfo()

getFileInfo() : mixed

返回文件信息

Returns

mixed

getEngineClass()

getEngineClass(null|string  $storage = null) : mixed

获取当前的存储引擎

Parameters

null|string $storage

指定存储方式,如不指定则为系统默认

Throws

\think\Exception

Returns

mixed