本文整理汇总了PHP中uwFindAllFiles函数的典型用法代码示例。如果您正苦于以下问题:PHP uwFindAllFiles函数的具体用法?PHP uwFindAllFiles怎么用?PHP uwFindAllFiles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uwFindAllFiles函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testIfDirIsNotIncluded
public function testIfDirIsNotIncluded()
{
$skipDirs = array($this->_notIncludeDir);
$files = uwFindAllFiles(self::WEBALIZER_DIR_NAME, array(), true, $skipDirs);
$this->assertNotContains($this->_notIncludeDir, $files, "Directory {$this->_notIncludeDir} shouldn't been included in this list");
$this->assertContains($this->_includeDir, $files, "Directory {$this->_includeDir} should been included in this list");
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:7,代码来源:Bug40793Test.php
示例2: systemCheckJsonGetFiles
function systemCheckJsonGetFiles($persistence)
{
global $sugar_config;
global $mod_strings;
// add directories here that should be skipped when doing file permissions checks (cache/upload is the nasty one)
$skipDirs = array($sugar_config['upload_dir'], 'themes');
if (!isset($persistence['dirs_checked'])) {
$the_array = array();
$files = array();
$dir = getcwd();
$d = dir($dir);
while ($f = $d->read()) {
if ($f == "." || $f == "..") {
// skip *nix self/parent
continue;
}
if (is_dir("{$dir}/{$f}")) {
$the_array[] = clean_path("{$dir}/{$f}");
} else {
$files[] = clean_path("{$dir}/{$f}");
}
}
$persistence['files_to_check'] = $files;
$persistence['dirs_to_check'] = $the_array;
$persistence['dirs_total'] = count($the_array);
$persistence['dirs_checked'] = false;
$out = "1% {$mod_strings['LBL_UW_DONE']}";
return $persistence;
} elseif ($persistence['dirs_checked'] == false) {
$dir = array_pop($persistence['dirs_to_check']);
$files = uwFindAllFiles($dir, array(), true, $skipDirs);
$persistence['files_to_check'] = array_merge($persistence['files_to_check'], $files);
$whatsLeft = count($persistence['dirs_to_check']);
if (!isset($persistence['dirs_to_check']) || $whatsLeft < 1) {
$whatsLeft = 0;
$persistence['dirs_checked'] = true;
}
$out = round(($persistence['dirs_total'] - $whatsLeft) / 21 * 100, 1) . "% {$mod_strings['LBL_UW_DONE']}";
$out .= " [{$mod_strings['LBL_UW_SYSTEM_CHECK_CHECKING_JSON']} {$dir}]";
} else {
$out = "Done";
}
echo trim($out);
return $persistence;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:45,代码来源:uw_ajax.php
示例3: getFilesForPermsCheck
/**
* generates an array with all files in the SugarCRM root directory, skipping
* cache/
* @return array files Array of files with absolute paths
*/
function getFilesForPermsCheck()
{
global $sugar_config;
logThis('Got JSON call to find all files...');
$filesNotWritable = array();
$filesNWPerms = array();
// add directories here that should be skipped when doing file permissions checks (cache/upload is the nasty one)
$skipDirs = array($sugar_config['upload_dir']);
$files = uwFindAllFiles(".", array(), true, $skipDirs, true);
return $files;
}
开发者ID:omusico,项目名称:sugar_work,代码行数:16,代码来源:uw_utils.php
示例4: logThis
/*********************************************************************************
* Description:
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
* Reserved. Contributor(s): ______________________________________..
* *******************************************************************************/
logThis('[At systemCheck.php]');
$stop = false;
// flag to prevent going to next step
///////////////////////////////////////////////////////////////////////////////
//// FILE CHECKS
logThis('Starting file permission check...');
$filesNotWritable = array();
$filesNWPerms = array();
// add directories here that should be skipped when doing file permissions checks (cache/upload is the nasty one)
$skipDirs = array($sugar_config['upload_dir'], '.svn');
$files = uwFindAllFiles(getcwd(), array(), true, $skipDirs);
$i = 0;
$filesOut = "\n\t<a href='javascript:void(0); toggleNwFiles(\"filesNw\");'>{$mod_strings['LBL_UW_SHOW_NW_FILES']}</a>\n\t<div id='filesNw' style='display:none;'>\n\t<table cellpadding='3' cellspacing='0' border='0'>\n\t<tr>\n\t\t<th align='left'>{$mod_strings['LBL_UW_FILE']}</th>\n\t\t<th align='left'>{$mod_strings['LBL_UW_FILE_PERMS']}</th>\n\t\t<th align='left'>{$mod_strings['LBL_UW_FILE_OWNER']}</th>\n\t\t<th align='left'>{$mod_strings['LBL_UW_FILE_GROUP']}</th>\n\t</tr>";
$isWindows = is_windows();
foreach ($files as $file) {
if ($isWindows) {
if (!is_writable_windows($file)) {
logThis('WINDOWS: File [' . $file . '] not readable - saving for display');
// don't warn yet - we're going to use this to check against replacement files
$filesNotWritable[$i] = $file;
$filesNWPerms[$i] = substr(sprintf('%o', fileperms($file)), -4);
$filesOut .= "<tr>" . "<td><span class='error'>{$file}</span></td>" . "<td>{$filesNWPerms[$i]}</td>" . "<td>" . $mod_strings['ERR_UW_CANNOT_DETERMINE_USER'] . "</td>" . "<td>" . $mod_strings['ERR_UW_CANNOT_DETERMINE_GROUP'] . "</td>" . "</tr>";
}
} else {
if (!is_writable($file)) {
logThis('File [' . $file . '] not writable - saving for display');
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:systemCheck.php
注:本文中的uwFindAllFiles函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论