\DtApp\ThinkLibrary\serviceStorageService

本地存储 Class StorageService

Summary

Methods
Properties
Constants
__construct()
instance()
path()
remotely()
save()
delete()
bytes()
getPath()
No public properties found
No constants found
initialize()
$app
N/A
getConfig()
http_get_data()
$path
$remotely
N/A

Properties

$app

$app : \think\App

应用实例

Type

\think\App

$path

$path : string

Type

string

$remotely

$remotely : string

Type

string

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

path()

path(string  $path) : $this

文件夹

Parameters

string $path

Returns

$this

remotely()

remotely(string  $remotely) : $this

需要保存的远程文件

Parameters

string $remotely

Returns

$this

save()

save(string  $name) : array

保存文件

Parameters

string $name

保存的文件名

Returns

array

delete()

delete(string  $name) : boolean

删除文件

Parameters

string $name

Returns

boolean

bytes()

bytes(string  $name) : string

统计文件大小

Parameters

string $name

Returns

string

getPath()

getPath() : string

获取文件路径

Returns

string

initialize()

initialize() : $this

初始化服务

Returns

$this

getConfig()

getConfig() : $this

获取配置信息

Returns

$this

http_get_data()

http_get_data(  $url) : false|string

下载

Parameters

$url

Returns

false|string