首页 WordPress函数大全 recurse_dirsize()

recurse_dirsize()

2020-05-02 / 3809阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

recurse_dirsize( string $directory, string|array $exclude = null, int $max_execution_time = null )

递归获取目录的大小。

描述

当包含其他目录时,由get_dirsize()用于获取目录的大小。

参数

$directory

(string)
(Required)
Full path of a directory.

$exclude

(string|array)
(Optional)
Full path of a subdirectory to exclude from the total, or array of paths. Expected without trailing slash(es).

Default value: null

$max_execution_time

(int)
(Optional)
Maximum time to run before giving up. In seconds. The timeout is global and is measured from the moment WordPress started to load.

Default value: null

返回

(int|false|null) Size in bytes if a valid directory. False if not. Null if timeout.

大家谈论
    我的见解