當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Folder::getFiles方法代碼示例

本文整理匯總了PHP中Folder::getFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Folder::getFiles方法的具體用法?PHP Folder::getFiles怎麽用?PHP Folder::getFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Folder的用法示例。


在下文中一共展示了Folder::getFiles方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: selectData

 public function selectData(CustomExternalFieldData &$data)
 {
     $path = $this->getUploadDir();
     $dir = new Folder($path);
     $files = $dir->getFiles();
     foreach ($files as $key => $file) {
         $files[$key] = new GalleryImage($path, $file->name());
     }
     $data->setData(null, $files);
 }
開發者ID:BackupTheBerlios,項目名稱:viscacha-svn,代碼行數:10,代碼來源:class.CustomImageSlider.php

示例2: end

<?php

require SYSPATH . '/helpers/Folder' . EXT;
/**
 * Bootstrap File
 */
/**
 * Getting all config files,
 * check application directory first then the system directory.
 */
$config_dir = 'config/';
$files = Folder::getFiles(SYSPATH . $config_dir);
foreach ($files as $file) {
    $ext = end(explode('.', $file));
    if ($ext === 'php') {
        if (file_exists(APPPATH . $config_dir . $file)) {
            include APPPATH . $config_dir . $file;
        } else {
            include SYSPATH . $config_dir . $file;
        }
    }
}
// Set default controller and action
define('DEFAULT_CONTROLLER', $route['_default']);
define('DEFAULT_ACTION', 'index');
// Load core files
require SYSPATH . '/core/Model' . EXT;
require SYSPATH . '/core/View' . EXT;
require SYSPATH . '/core/Controller' . EXT;
require SYSPATH . '/helpers/Inflector' . EXT;
require SYSPATH . '/core/Benchmark' . EXT;
開發者ID:silentworks,項目名稱:the-compressor,代碼行數:31,代碼來源:Bootstrap.php

示例3: array

<?php

$MODULE = array('getFiles' => function () {
    $path = post('path');
    $FOLDER = new Folder($path);
    return array('files' => $FOLDER->getFiles(function ($file) use($FOLDER) {
        return $file->path != $FOLDER->path;
    }, function ($file) {
        return $file->toArray();
    }), 'info' => $FOLDER->toFileArray());
}, 'newFile' => function () {
    $path = post('path');
    return array('error' => File::create($path));
}, 'newFolder' => function () {
    $path = post('path');
    return array('error' => Folder::create($path));
}, 'delete' => function () {
    $path = post('path');
    $err = _is_dir($path) ? Folder::delete($path) : File::delete($path);
    return array('error' => $err);
}, 'unlock' => function () {
    $path = post('path');
    return array('error' => File::unlock($path));
});
開發者ID:WKnight02,項目名稱:BitterFox_III,代碼行數:24,代碼來源:init.php


注:本文中的Folder::getFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。