1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 01:20:40 +01:00

[ticket/15371] Add doc

PHPBB3-15371
This commit is contained in:
Rubén Calvo 2018-06-07 16:13:16 +02:00
parent db8ae41496
commit a641ea9291

View File

@ -63,6 +63,17 @@ class local implements adapter_interface, stream_interface
protected $path;
/*
* Subdirectories depth
*
* Instead of storing all folders on the same directory, they can be divided
* into smaller directories. This variable means the number of subdirectories of
* depth to store the file. For example:
* depth = 0 -> /images/avatars/upload/my_avatar.jpg
* depth = 2 -> /images/avatars/upload/d9/8c/my_avatar.jpg
* This is for those who have problems storing a large number of files on
* a single directory.
* More info: https://tracker.phpbb.com/browse/PHPBB3-15371
*
* @var int dir_depth
*/
protected $dir_depth;
@ -251,6 +262,12 @@ class local implements adapter_interface, stream_interface
while ($path && @rmdir($dirpath . $path));
}
/**
* Get the path to the file, appending subdirectories for directory depth
* if $dir_depth > 0.
*
* @param string $path The file path
*/
protected function get_filepath($path)
{
$pathinfo = pathinfo($path);