| Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/modules/translate/lib/io/ |
| Current File : /var/www/element/data/www/revenuestory.ru/bitrix/modules/translate/lib/io/filesystemhelper.php |
<?php
namespace Bitrix\Translate\IO;
use Bitrix\Translate;
class FileSystemHelper
{
/**
* Return list full path of folders.
*
* @param string $path Path to check.
*
* @return string[]
*/
public static function getFolderList($path)
{
$path = Translate\IO\Path::tidy(\rtrim($path, '/'));
if (defined('GLOB_BRACE'))
{
return \glob($path.'/{,.}*', \GLOB_BRACE | \GLOB_ONLYDIR);
}
return array_merge(
\glob($path.'/.*', \GLOB_ONLYDIR),
\glob($path.'/*', \GLOB_ONLYDIR)
);
}
/**
* Return list full path of folders.
*
* @param string $path Path to check.
*
* @return string[]
*/
public static function getFileList($path)
{
$path = Translate\IO\Path::tidy(\rtrim($path, '/'));
if (defined('GLOB_BRACE'))
{
return \glob($path.'/{,.}*.php', \GLOB_BRACE);
}
return array_merge(
\glob($path.'/.*.php'),
\glob($path.'/*.php')
);
}
}