100+ results for 'php is_dir'
Not the results you expected?
type.php (https://bitbucket.org/selfeky/xclusivescardwebsite.git) PHP · 261 lines
1 <?php
2 defined('C5_EXECUTE') or die("Access Denied.");
3 class AttributeType extends Object {
141 $db = Loader::db();
142 $h = $this->getPackageHandle();
143 $url = (is_dir(DIR_PACKAGES . '/' . $h)) ? BASE_URL . DIR_REL : ASSETS_URL;
144 $url = $url . '/' . DIRNAME_PACKAGES . '/' . $h . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $this->getAttributeTypeHandle() . $ff;
145 } else if (file_exists(DIR_MODELS_CORE . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $this->getAttributeTypeHandle() . $ff)) {
172 $file = DIR_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $_file;
173 $url = BASE_URL . DIR_REL . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $_file;
174 } else if ($_file == FILENAME_ATTRIBUTE_CONTROLLER && file_exists(DIR_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '.php')) {
175 $file = DIR_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '.php';
179 if (!isset($file) && $pkgID > 0) {
180 $pkgHandle = PackageList::getHandle($pkgID);
181 $dirp = is_dir(DIR_PACKAGES . '/' . $pkgHandle) ? DIR_PACKAGES . '/' . $pkgHandle : DIR_PACKAGES_CORE . '/' . $pkgHandle;
182 if (file_exists($dirp . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $_file)) {
183 $file = $dirp . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $_file;
Config.php (https://github.com/ngocanh/pimcore.git) PHP · 379 lines
Clover.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 284 lines
1 <?php
2 /*
3 * This file is part of the PHP_CodeCoverage package.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
11 /**
12 * Generates a Clover XML logfile from an PHP_CodeCoverage object.
13 *
14 * @since Class available since Release 1.0.0
15 */
16 class PHP_CodeCoverage_Report_Clover
17 {
18 /**
Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines
1 <?php
2 namespace W3TC;
116 $expires_at = time() + $expire;
117 @fputs( $fp, pack( 'L', $expires_at ) );
118 @fputs( $fp, '<?php exit; ?>' );
119 @fputs( $fp, @serialize( $var ) );
120 @fclose( $fp );
314 $hash = md5( $key );
316 $path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );
318 return $path;
343 $full_path = $path . DIRECTORY_SEPARATOR . $entry;
345 if ( @is_dir( $full_path ) ) {
346 $size = $this->dirsize( $full_path, $size, $timeout_time );
347 } else {
file_handling_over_ftp.php (https://github.com/akelos/akelos.git) PHP · 291 lines
1 <?php
3 //
6 if(!defined('AK_UPLOAD_FILES_USING_FTP')){
7 if(!function_exists('ftp_connect')){
8 echo "PHP is not compiled with FTP support\n";
9 return;
10 }
20 }
22 require_once(dirname(__FILE__).'/../config.php');
24 class FileHandlingOverFtp_TestCase extends ActiveSupportUnitTest
255 }
257 public function test_is_dir() {
258 if(!RUN_FTP_TESTS) return;
259 $path = 'invalid path';
SplFileInfo.php (https://github.com/tstarling/hiphop-php.git) PHP · 432 lines
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
6 *
7 * The SplFileInfo class offers a high-level object oriented interface to
189 // This doc comment block generated by idl/sysdoc.php
190 /**
191 * ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )
192 *
193 * Returns the time when the contents of the file were changed. The time
292 // This doc comment block generated by idl/sysdoc.php
293 /**
294 * ( excerpt from http://php.net/manual/en/splfileinfo.isdir.php )
295 *
296 * This method can be used to determine if the file is a directory.
NativeSessionStorageTest.php (https://gitlab.com/TouirMohamedMarwen/Symfony2) PHP · 257 lines
1 <?php
3 /*
29 * @runTestsInSeparateProcesses
30 */
31 class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase
32 {
33 private $savePath;
37 ini_set('session.save_handler', 'files');
38 ini_set('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test');
39 if (!is_dir($this->savePath)) {
40 mkdir($this->savePath);
41 }
46 session_write_close();
47 array_map('unlink', glob($this->savePath.'/*'));
48 if (is_dir($this->savePath)) {
49 rmdir($this->savePath);
50 }
Template.php (https://bitbucket.org/wl-framework-dev/weblab-framework.git) PHP · 350 lines
1 <?php
2 /**
3 * Represents a PHP Template file
237 /**
238 * Include a component file for current template
239 * $component will be attached behind the filename, including a suffix .php
240 *
241 * @param string $component
255 $theme .= '/';
257 $path = $this->_dir . '/' . $theme . $name . $component . '.php';
259 if( isset( self::_getConfig()->extract_vars ) && self::_getConfig()->extract_vars && $extract ) {
301 protected function _putCache( $path, $code ) {
302 $folder = dirname( $path );
303 if( !is_dir( $folder ) ) {
304 mkdir( $folder, 0755, true );
305 }
plugin.test.php (https://github.com/tsep/tsep1.git) PHP · 263 lines
7 * PHP versions 4 and 5
8 *
9 * CakePHP : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2006-2010, Cake Software Foundation, Inc.
11 *
14 *
15 * @copyright Copyright 2006-2010, Cake Software Foundation, Inc.
16 * @link http://cakephp.org CakePHP Project
17 * @package cake
18 * @subpackage cake.tests.cases.console.libs.tasks
19 * @since CakePHP v 1.3.0
20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
132 $this->assertTrue(file_exists($path . DS . 'views' . DS . 'helpers' . DS . 'empty'), 'No empty file %s');
134 $this->assertTrue(is_dir($path . DS . 'tests'), 'No tests dir %s');
135 $this->assertTrue(is_dir($path . DS . 'tests' . DS . 'cases'), 'No cases dir %s');
ozio.helper.php (https://github.com/MaBelleEcole/Main.git) PHP · 396 lines
1 <?php
2 /**
3 * This file is part of Ozio Gallery 2.
17 *
18 * @copyright Copyright (C) 2010 Open Source Solutions S.L.U. All rights reserved.
19 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see RT-LICENSE.php
20 */
35 foreach($objs as $obj)
36 {
37 @is_dir($obj)? Svuota($obj) : @unlink($obj);
38 }
39 }
47 $message = JText::_('Cartella XML').' Imagerotator '.JText::_('svuotata correttamente');
48 $link = 'index.php?option=com_oziogallery2&view=reset';
49 $mainframe->redirect( $link, $message);
50 }
file.php (https://github.com/GeorgeHuynh/core.git) PHP · 356 lines
1 <?php
2 /**
3 * Part of the Fuel framework.
8 * @license MIT License
9 * @copyright 2010 - 2011 Fuel Development Team
10 * @link http://fuelphp.com
11 */
316 case 'path':
317 // do we have a path?
318 if ( empty($item) OR ! is_dir($item))
319 {
320 throw new \FuelException('You have specify a valid path to store the session data files.');
FilesystemTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 240 lines
1 <?php
3 /*
119 * @group GH-1339
120 */
121 public function testRemoveDirectoryPhp()
122 {
123 $tmp = sys_get_temp_dir();
127 $fs = new Filesystem;
128 $this->assertTrue($fs->removeDirectoryPhp($tmp . "/composer_testdir"));
129 $this->assertFalse(file_exists($tmp . "/composer_testdir/level1/level2/hello.txt"));
130 }
195 }
197 if (!is_dir($symlinked)) {
198 $this->fail('Precondition assertion failed (is_dir is false on symbolic link to directory).');
Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines
ConfigFileFinder.php (https://gitlab.com/ricardosanchez/prueba) PHP · 270 lines
1 <?php
2 /**
3 * @package Gantry5
165 $path = trim(Folder::getRelativePath($folder), '/');
167 if (is_dir($folder)) {
168 // Find all system and user configuration files.
169 $options = [
207 $list = [];
209 if (is_dir($folder)) {
210 $iterator = new \DirectoryIterator($folder);
243 $path = trim(Folder::getRelativePath($folder), '/');
245 if (is_dir($folder)) {
246 // Find all system and user configuration files.
247 $options = [
Rename.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 310 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Rename.php 20096 2010-01-06 02:05:09Z bkarwin $
20 */
29 * @see Zend_Filter_Interface
30 */
31 require_once 'Zend/Filter/Interface.php';
33 /**
65 $options = array('target' => $options);
66 } elseif (!is_array($options)) {
67 require_once 'Zend/Filter/Exception.php';
68 throw new Filter\Exception('Invalid options argument provided to filter');
69 }
Clover.php (https://gitlab.com/madebycloud/derekman) PHP · 290 lines
1 <?php
2 /*
3 * This file is part of the PHP_CodeCoverage package.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
11 /**
12 * Generates a Clover XML logfile from an PHP_CodeCoverage object.
13 *
14 * @category PHP
15 * @package CodeCoverage
16 * @author Sebastian Bergmann <sebastian@phpunit.de>
17 * @copyright Sebastian Bergmann <sebastian@phpunit.de>
File.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 448 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
22 */
31 * @see Zend_OpenId_Provider_Storage
32 */
33 require_once "Zend/OpenId/Provider/Storage.php";
35 /**
75 }
76 $this->_dir = $dir;
77 if (!is_dir($this->_dir)) {
78 if (!@mkdir($this->_dir, 0700, 1)) {
79 throw new OpenId\Exception(
ClassMapGeneratorTest.php (https://github.com/jdewit/symfony.git) PHP · 144 lines
83 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php',
84 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php',
85 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php',
99 'Beta\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php',
100 'Beta\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php',
101 'ClassMap\\SomeInterface' => realpath(__DIR__).'/Fixtures/classmap/SomeInterface.php',
108 $data[] = array(__DIR__.'/Fixtures/php5.4', array(
109 'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php',
110 'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php',
111 'Foo\\TBar' => __DIR__.'/Fixtures/php5.4/traits.php',
112 'Foo\\IBar' => __DIR__.'/Fixtures/php5.4/traits.php',
113 'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php',
114 'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php',
115 ));
116 }
ServerMKCOLTest.php (https://github.com/lkneschke/SabreDAV.git) PHP · 338 lines
1 <?php
3 require_once 'Sabre/HTTP/ResponseMock.php';
4 require_once 'Sabre/DAV/AbstractServer.php';
5 require_once 'Sabre/DAV/Exception.php';
25 $this->assertEquals('HTTP/1.1 201 Created',$this->response->status);
26 $this->assertEquals('', $this->response->body);
27 $this->assertTrue(is_dir($this->tempDir . '/testcol'));
29 }
files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines
13 */
15 namespace phpFastCache\Drivers;
17 use phpFastCache\Core\DriverAbstract;
18 use phpFastCache\Exceptions\phpFastCacheDriverException;
20 /**
28 * phpFastCache_files constructor.
29 * @param array $config
30 * @throws phpFastCacheDriverException
31 */
32 public function __construct($config = array())
72 if (!file_exists($path)) {
73 if (!mkdir($path, $this->__setChmodAuto())) {
74 throw new phpFastCacheDriverException('PLEASE CHMOD ' . $this->getPath() . ' - 0777 OR ANY WRITABLE PERMISSION!', 92);
75 }
76 }
LuceneTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 315 lines
1 <?php
2 /**
3 * @category Zend
10 * Zend_Search_Lucene
11 */
12 require_once 'Zend/Search/Lucene.php';
14 /**
15 * PHPUnit test case
16 */
17 require_once 'PHPUnit/Framework/TestCase.php';
23 * @subpackage UnitTests
24 */
25 class Zend_Search_Lucene_LuceneTest extends PHPUnit_Framework_TestCase
26 {
27 public function testCreate()
Libupload.php (https://github.com/ekoisa/pyrocms-shop.git) PHP · 256 lines
migrator.php (https://bitbucket.org/anujan/shurima.net.git) PHP · 245 lines
1 <?php namespace Laravel\CLI\Tasks\Migrate;
3 use Laravel\Str;
85 $migration['migration']->up();
87 echo 'Migrated: '.$this->display($migration).PHP_EOL;
89 // After running a migration, we log its execution in the migration
118 $migration['migration']->down();
120 echo 'Rolled back: '.$this->display($migration).PHP_EOL;
122 // By only removing the migration after it has successfully rolled back,
197 // we will create the directory so there aren't errors when
198 // when we try to write the migration file.
199 if ( ! is_dir($path)) mkdir($path);
201 $file = $path.$prefix.'_'.$migration.EXT;
Filesystem.php (https://gitlab.com/kimting254/wbms) PHP · 441 lines
Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines
1 <?php
2 /**
3 * Directory Gadget
65 unset($data['tags']);
67 $data['is_dir'] = false;
68 $data['public'] = (bool)$data['public'];
69 $data['title'] = Jaws_XSS::defilter($data['title']);
77 $dirPath = ROOT_DATA_PATH . 'directory';
78 if (!is_dir($dirPath)) {
79 if (!Jaws_FileManagement_File::mkdir($dirPath)) {
80 throw new Exception('DIRECTORY_ERROR_FILE_UPLOAD');
240 function DeleteFile($data)
241 {
242 if ($data['is_dir']) {
243 $files = $this->gadget->model->load('Files')->GetFiles(array('parent' => $data['id']));
244 if (Jaws_Error::IsError($files)) {
AbstractExporter.php (https://github.com/xbojer/gfw.git) PHP · 215 lines
1 <?php
3 /*
30 * which can be found in \Doctrine\ORM\Tools\Export\Driver
31 *
32 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
33 * @link www.doctrine-project.org
34 * @since 2.0
86 * Set the directory to output the mapping files to
87 *
88 * [php]
89 * $exporter = new YamlExporter($metadata);
90 * $exporter->setOutputDir(__DIR__ . '/yaml');
107 public function export()
108 {
109 if ( ! is_dir($this->_outputDir)) {
110 mkdir($this->_outputDir, 0777, true);
111 }
Doctrine.php (https://bitbucket.org/nlabyt/bcf-ball-4eb2.git) PHP · 198 lines
1 <?php
2 /**
3 * @version $Id: Doctrine.php 48966 2012-02-13 23:48:42Z steph $
73 if ($handle = opendir($extention_dir)) {
74 while (false !== ($file = readdir($handle))) {
75 if (!preg_match('/^\./', $file) && is_dir($extention_dir . '/' . $file)) {
76 $this->manager->registerExtension($file, $extention_dir . '/' . $file);
77 }
156 public static function useMemDBCache($identifier = 'rokcommon')
157 {
158 if (phpversion('pdo_sqlite')) {
159 $self = self::getInstance();
160 $cacheConn = Doctrine_Manager::connection(new PDO('sqlite::memory:'));
DownloadController.php (https://github.com/timglabisch/pimcore.git) PHP · 196 lines
1 <?php
2 /**
3 * Pimcore
49 $remoteConfig["token"] = Pimcore_Liveconnect::getToken();
50 $rawData = Pimcore_Tool::getHttpData("http://extensions.pimcore.org/download/getExtensions.php", null, array("data" => base64_encode(Pimcore_Tool_Serialize::serialize($remoteConfig))));
52 if(!$rawData) {
70 );
72 $rawData = Pimcore_Tool::getHttpData("http://extensions.pimcore.org/download/getDownloadInformation.php", null, array("data" => base64_encode(Pimcore_Tool_Serialize::serialize($remoteConfig))));
74 if(!$rawData) {
109 $remoteConfig = $this->getAllParams();
110 $remoteConfig["token"] = Pimcore_Liveconnect::getToken();
111 $rawData = Pimcore_Tool::getHttpData("http://extensions.pimcore.org/download/downloadFile.php?data=" . base64_encode(Pimcore_Tool_Serialize::serialize($remoteConfig)));
113 if(!$rawData) {
ImageUpload.php (http://geocontexter.googlecode.com/svn/trunk/) PHP · 257 lines
1 <?php
2 /**
3 * GeoContexter
27 * @package GeoContexter
28 * @subpackage Module_Geocontexter
29 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
30 * @author Armand Turpel <geocontexter@gmail.com>
31 * @version $Rev: 768 $ / $LastChangedDate: 2010-12-16 16:11:56 +0100 (jeu., 16 d?c. 2010) $ / $LastChangedBy: armand.turpel $
125 private function create_files_folder( $path )
126 {
127 if(!is_dir($path))
128 {
129 $oldumask = umask(0);
ETAppearanceAdminController.class.php (https://github.com/iugo/esoTalk.git) PHP · 222 lines
1 <?php
2 // Copyright 2011 Toby Zerner, Simon Zerner
3 // This file is part of esoTalk. Please see the included license file for usage information.
43 while (false !== ($file = readdir($handle))) {
45 // Make sure the skin is valid, and include its skin.php file.
46 if ($file[0] != "." and file_exists($skinFile = PATH_SKINS."/$file/skin.php") and (include_once $skinFile)) {
185 // Make sure there's an actual skin file in there.
186 if (substr($file["name"], -8) == "skin.php") $skinFound = true;
187 }
196 // Make a directory if it doesn't exist!
197 if ($file["directory"] and !is_dir("skins/{$file["name"]}")) mkdir("skins/{$file["name"]}");
199 // Write a file.
coverage.php (https://github.com/welaika/wordless.git) PHP · 211 lines
1 <?php
2 /**
3 * @package SimpleTest
7 * load coverage data handle
8 */
9 require_once dirname(__FILE__) . '/coverage_data_handler.php';
11 /**
58 while ($file = readdir($parent)) {
59 $path = "$parentPath/$file";
60 if (is_dir($path)) {
61 if ($file != '.' && $file != '..') {
62 if ($this->isDirectoryIncluded($path, $directoryDepth)) {
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
1 <?php
3 /**
4 * File holding the DirectFilesystem class.
5 *
6 * @file DirectFilesystem.php
7 * @ingroup Deployment
8 * @ingroup Filesystem
17 /**
18 * Filesystem class for direct PHP file and folder manipulation.
19 *
20 * @author Jeroen De Dauw
320 public function isDir( $path ) {
321 wfSuppressWarnings();
322 $result = (bool)is_dir( $path );
323 wfRestoreWarnings();
324 return $result;
Storage.php (https://github.com/jmarien/phpBayeux.git) PHP · 316 lines
ServerTest.php (https://github.com/fruux/sabre-dav.git) PHP · 267 lines
1 <?php declare (strict_types=1);
3 namespace Sabre\DAV\FSExt;
6 use Sabre\HTTP;
8 require_once 'Sabre/DAV/AbstractServer.php';
10 class ServerTest extends DAV\AbstractServer{
111 $this->assertEquals(201, $this->response->status);
112 $this->assertEquals('', $this->response->body);
113 $this->assertTrue(is_dir($this->tempDir . '/testcol'));
115 }
241 $this->assertTrue(
242 is_dir($this->tempDir . '/tree2/tree1')
243 );
theme.class.php (https://github.com/Arkadiy-Sedelnikov/joostina-1.4.git) PHP · 524 lines
1 <?php
2 /**
3 * SPAW Editor v.2 Theme classes
9 */
11 require_once(str_replace('\\\\', '/', dirname(__FILE__)) . '/config.class.php');
13 /**
429 if(strpos($this->name, '/') || strpos($this->name, "\\")) die("illegal theme name");
430 $pgdir = SpawConfig::getStaticConfigValue("SPAW_ROOT") . 'plugins/';
431 if(is_dir($pgdir)){
432 // load theme settings
433 if($dh = opendir($pgdir)){
434 while(($pg = readdir($dh)) !== false){
435 if(file_exists($pgdir . $pg . '/lib/theme/' . $this->name . '/config/theme.config.php')){
436 // load theme config file for each plugin
437 include($pgdir . $pg . '/lib/theme/' . $this->name . '/config/theme.config.php');
File.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 442 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 // // // // // // // // require_once "Zend/OpenId/Provider/Storage.php";
29 /**
69 }
70 $this->_dir = $dir;
71 if (!is_dir($this->_dir)) {
72 if (!@mkdir($this->_dir, 0700, 1)) {
73 throw new Zend_OpenId_Exception(
File.php (https://github.com/Excito/horde3.git) PHP · 317 lines
1 <?php
2 /**
3 * A representation of a cache file.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
10 * @author Gunnar Wrobel <wrobel@pardus.de>
11 * @license http://www.fsf.org/copyleft/lgpl.html LGPL
12 * @link http://pear.horde.org/index.php?package=Kolab_FreeBusy
13 */
16 * A representation of a cache file.
17 *
18 * $Horde: framework/Kolab_FreeBusy/lib/Horde/Kolab/FreeBusy/Cache/File.php,v 1.1.2.3 2010/10/10 16:26:42 wrobel Exp $
19 *
20 * Copyright 2004-2008 Klarälvdalens Datakonsult AB
CacheFile.class.php (https://gitlab.com/llwhois/woaimm) PHP · 184 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
43 private function init() {
44 // 创建项目缓存目录
45 if (!is_dir($this->options['temp'])) {
46 mkdir($this->options['temp']);
47 }
62 $dir .= $name{$i}.'/';
63 }
64 if(!is_dir($this->options['temp'].$dir)) {
65 mkdir($this->options['temp'].$dir,0755,true);
66 }
Config.php (https://github.com/timglabisch/pimcore.git) PHP · 478 lines
openid_file_store.php (https://github.com/F5/zetacomponents.git) PHP · 301 lines
UploadCache.class.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 204 lines
1 <?php
3 class UploadCache {
188 private static function rmdir_recursive($dir) {
189 if (is_dir($dir)) {
190 $objects = scandir($dir);
191 foreach ($objects as $object) {
192 if ($object != '.' && $object != '..') {
193 if (is_dir($dir.DIRECTORY_SEPARATOR.$object)) {
194 UploadCache::rmdir_recursive($dir.DIRECTORY_SEPARATOR.$object);
195 } else {
FossilDownloaderTest.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 173 lines
Rar.php (https://bitbucket.org/haichau59/manga.git) PHP · 252 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Rar.php 24594 2012-01-05 21:27:01Z matthew $
20 */
23 * @see Zend_Filter_Compress_CompressAbstract
24 */
25 //require_once 'Zend/Filter/Compress/CompressAbstract.php';
27 /**
61 {
62 if (!extension_loaded('rar')) {
63 //require_once 'Zend/Filter/Exception.php';
64 throw new Zend_Filter_Exception('This filter needs the rar extension');
65 }
windowsfslib.php (https://github.com/yourhty/hypervm.git) PHP · 219 lines
1 <?php
3 function lxshell_getzipcontent($path)
55 }
56 if (lxfile_exists($file)) {
57 if (is_dir($file)) {
58 $obj->deleteFolder($file);
59 } else {
105 }
106 log_filesys("MvFolder $dirsource $dirdest");
107 if (is_dir($dirsource)) {
108 $obj->MoveFolder($dirsource, $dirdest);
109 } else {
120 $dirdest = expand_real_root($dirdest);
121 $dirsource = expand_real_root($dirsource);
122 if (lfile_exists($dirdest) && is_dir($dirdest)) {
123 $dirdest = $dirdest . "/" . basename($dirsource);
124 }
index.php (https://github.com/serapherny/semi-god-semi-devil.git) PHP · 212 lines
1 <?php
3 /*
80 * --------------------------------------------------------------------
81 *
82 * Normally you will set your default controller in the routes.php file.
83 * You can, however, force a custom routing by hard-coding a
84 * specific controller class/function here. For most applications, you
113 * The $assign_to_config array below will be passed dynamically to the
114 * config class when initialized. This allows you to set custom config
115 * items or override any default config values found in the config.php file.
116 * This can be handy as it permits you to share one application between
117 * multiple front controller files, with each file containing different
151 // Is the system path correct?
152 if ( ! is_dir($system_path))
153 {
154 exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
Doctrine.php (https://github.com/leadhome/handmade.git) PHP · 345 lines
Translate.php (https://github.com/jaws-project/jaws.git) PHP · 330 lines
1 <?php
2 /**
3 * Class to manage translation of strings
8 * @author Pablo Fischer <pablo@pablo.com.mx>
9 * @author Jon Wood <jon@substance-it.co.uk>
10 * @author Ali Fazelzadeh <afz@php.net>
11 * @copyright 2005-2022 Jaws Development Group
12 * @license http://www.gnu.org/copyleft/lesser.html
78 $gadgets = scandir($gDir);
79 foreach ($gadgets as $gadget) {
80 if ($gadget[0] == '.' || !is_dir($gDir . $gadget)) {
81 continue;
82 }
87 $plugins = scandir($pDir);
88 foreach ($plugins as $plugin) {
89 if ($plugin[0] == '.' || !is_dir($pDir . $plugin)) {
90 continue;
91 }
admin.php (https://github.com/daK76/pyrocms.git) PHP · 277 lines
1 <?php
2 /**
3 * Modules controller, lists all installed modules
27 // Check the referrer
28 parse_url($this->input->server('HTTP_REFERER'), PHP_URL_HOST) == parse_url(BASE_URL, PHP_URL_HOST) or show_error('Invalid Referrer');
29 }
77 // Now try to unzip
78 $this->load->library('unzip');
79 $this->unzip->allow(array('xml', 'html', 'css', 'js', 'png', 'gif', 'jpeg', 'jpg', 'swf', 'ico', 'php'));
81 // Try and extract
263 return @unlink($str);
264 }
265 elseif (is_dir($str))
266 {
267 $scan = glob(rtrim($str,'/').'/*');
CheckfilesPluginTest.php (https://github.com/joomla/joomla-cms.git) PHP · 220 lines
File.php (https://gitlab.com/pthapa81/MeroSaaman-1.0) PHP · 160 lines
1 <?php
3 /*
91 * Returns the extension of the file.
92 *
93 * \SplFileInfo::getExtension() is not available before PHP 5.3.6
94 *
95 * @return string The extension
130 protected function getTargetFile($directory, $name = null)
131 {
132 if (!is_dir($directory)) {
133 if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) {
Local.php (https://bitbucket.org/ajalovec/gaufrette.git) PHP · 143 lines
Image.php (https://github.com/back2arie/Panada.git) PHP · 317 lines
1 <?php
2 /**
3 * Panada Image Modifier.
5 * @package Resources
6 * @link http://panadaframework.com/
7 * @license http://www.opensource.org/licenses/bsd-license.php
8 * @author Iskandar Soesman <k4ndar@yahoo.com>
9 * @since Version 0.1
144 * Does it folder exist?
145 */
146 if( ! is_dir($this->folder) ) {
147 $this->errorMessages[] = 'The folder '.$this->folder.' doesn\'t exists please create it first.';
148 return false;
check.php (https://github.com/back2arie/Panada.git) PHP · 226 lines
87 </td>
88 <td>
89 <?php echo PHP_VERSION ?>
90 </td>
91 <td>
92 <?php if (version_compare(PHP_VERSION, '5.3.0', '>=')): ?>
93 <span class="pass">PASS</span>
94 <?php else: $failed = TRUE ?>
103 </td>
105 <?php if (is_dir(THISPATH . DS . '../panada') AND is_file(THISPATH . DS . '../panada' . DS . 'Gear.php')): ?>
106 <td><span class="monospace"><?php echo THISPATH . DS . 'panada' ?></span></td>
117 Application Directory
118 </td>
119 <?php if (is_dir(THISPATH . DS) AND is_file(THISPATH . DS . 'config' . DS . 'main.php')): ?>
120 <td><span class="monospace"><?php echo THISPATH . DS ?></td>
class_writer.php (https://github.com/F5/zetacomponents.git) PHP · 290 lines
1 <?php
2 /**
3 * File containing the ezcDbSchemaPersistentClassWriter class.
27 /**
28 * This handler creates PHP classes to be used with PersistentObject from a
29 * DatabaseSchema.
30 *
88 public function saveToFile( $dir, ezcDbSchema $dbSchema )
89 {
90 if ( !is_dir( $dir ) )
91 {
92 throw new ezcBaseFileNotFoundException( $dir, 'directory' );
176 /**
177 * Writes a PHP class.
178 * This method writes a PHP class from a table definition.
StreamHandler.php (https://gitlab.com/judielsm/Handora) PHP · 146 lines
1 <?php
3 /*
17 * Stores to any stream resource
18 *
19 * Can be used to store into php://stderr, remote and local files, etc.
20 *
21 * @author Jordi Boggiano <j.boggiano@seld.be>
134 $dir = $this->getDirFromStream($this->url);
135 if (null !== $dir && !is_dir($dir)) {
136 $this->errorMessage = null;
137 set_error_handler(array($this, 'customErrorHandler'));
class-vc-updater.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 142 lines
1 <?php
2 /**
3 * WPBakery Visual Composer updater
93 $purchase_code = vc_settings()->get( 'js_composer_purchase_code' );
94 if ( ! vc_license()->isActivated() || empty( $username ) || empty( $api_key ) || empty( $purchase_code ) ) {
95 return new WP_Error( 'no_credentials', __( 'To receive automatic updates license activation is required. Please visit <a href="' . admin_url( 'options-general.php?page=vc_settings&tab=updater' ) . '' . '" target="_blank">Settings</a> to activate your Visual Composer.', 'js_composer' ) );
96 }
97 $json = wp_remote_get( $this->envatoDownloadPurchaseUrl( $username, $api_key, $purchase_code ) );
106 }
107 $upgrade_folder = $wp_filesystem->wp_content_dir() . 'uploads/js_composer_envato_package';
108 if ( is_dir( $upgrade_folder ) ) {
109 $wp_filesystem->delete( $upgrade_folder );
110 }
125 public function removeTemporaryDir() {
126 global $wp_filesystem;
127 if ( is_dir( $wp_filesystem->wp_content_dir() . 'uploads/js_composer_envato_package' ) ) {
128 $wp_filesystem->delete( $wp_filesystem->wp_content_dir() . 'uploads/js_composer_envato_package', true );
129 }
execute.php (https://gitlab.com/elasa/shop2.elasa.ir) PHP · 205 lines
1 <?php
2 include('config/config.php');
3 if ($_SESSION['verify'] != 'RESPONSIVEfilemanager') die('forbiden');
4 include('include/utils.php');
6 $_POST['path_thumb'] = $thumbs_base_path.$_POST['path_thumb'];
15 die('wrong path');
17 $language_file = 'lang/en.php';
18 if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '')
19 {
20 $path_parts = pathinfo($_GET['lang']);
21 if (is_readable('lang/'.$path_parts['basename'].'.php'))
22 $language_file = 'lang/'.$path_parts['basename'].'.php';
File.php (https://bitbucket.org/acidel/buykoala.git) PHP · 197 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Core
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
68 $currentDir = $this->getMediaBaseDirectory() . $dir;
70 if (is_dir($currentDir)) {
71 $dh = opendir($currentDir);
72 if ($dh) {
area.php (https://github.com/Keilaron/TweetBeagle.git) PHP · 264 lines
1 <?php
2 /**
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
8 * @license MIT License
9 * @copyright 2010 - 2011 Fuel Development Team
10 * @link http://fuelphp.com
11 */
101 return \File_Handler_File::factory($path, $config, $this);
102 }
103 elseif (is_dir($path))
104 {
105 return \File_Handler_Directory::factory($path, $config, $this, $content);
262 }
264 /* End of file area.php */
bookmarks.php (https://gitlab.com/Gashler/sg) PHP · 113 lines
1 <?php
2 defined('WYSIJA') or die('Restricted access');
3 class WYSIJA_help_bookmarks extends WYSIJA_object {
32 foreach($iconsets as $iconset) {
33 // loop through each iconset
34 if(in_array($iconset, array('.', '..', '.DS_Store', 'Thumbs.db')) === FALSE and is_dir($sourceDir.DS.$iconset)) {
36 // get all icons from current iconset
FileSystem.php (https://gitlab.com/vanafroo/landingpage) PHP · 171 lines
configurable.php (https://github.com/agallou/atoum.git) PHP · 166 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\script;
8 ;
10 require_once __DIR__ . '/../../runner.php';
12 class configurable extends atoum\test
22 public function testClassConstants()
23 {
24 $this->string(testedClass::defaultConfigFile)->isEqualTo('.config.php');
25 }
116 ->and($this->calling($configurable)->useConfigFile = function() {})
117 ->and($configurable->setAdapter($adapter = new atoum\test\adapter()))
118 ->and($adapter->is_dir = true)
119 ->then
120 ->object($configurable->useDefaultConfigFiles())->isIdenticalTo($configurable)
BlockViewTemplate.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 227 lines
48 if ( substr( $bFilename, -4 ) === ".php" ) {
49 $bFilenameWithoutDotPhp = substr( $bFilename, 0, strlen( $bFilename ) -4 );
50 }
60 $this->baseURL = ASSETS_URL . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle();
61 $this->basePath = DIR_FILES_BLOCK_TYPES_CORE . '/' . $obj->getBlockTypeHandle();
62 } else if (is_dir(DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilename)) {
63 $template = DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilename . '/' . $this->render;
64 $this->basePath = DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilename;
70 } else if ( $bFilename !== $bFilenameWithoutDotPhp ) {
71 if (is_dir(DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp)) {
72 $template = DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp . '/' . $this->render;
73 $this->basePath = DIR_FILES_BLOCK_TYPES . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp;
74 $this->baseURL = REL_DIR_APPLICATION . '/' . DIRNAME_BLOCKS . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp;
75 } else if (is_dir(DIR_FILES_BLOCK_TYPES_CORE . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp)) {
76 $template = DIR_FILES_BLOCK_TYPES_CORE . '/' . $obj->getBlockTypeHandle() . '/' . DIRNAME_BLOCK_TEMPLATES . '/' . $bFilenameWithoutDotPhp . '/' . $this->render;
FsExplorer.class.php (https://github.com/midnightskinhead/tubepress.git) PHP · 297 lines
1 <?php
2 /**
3 * Copyright 2006 - 2011 Eric D. Hough (http://ehough.com)
20 */
22 class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../classloader/ClassLoader.class.php';
23 org_tubepress_impl_classloader_ClassLoader::loadClasses(array(
24 'org_tubepress_api_filesystem_Explorer',
66 $realDir = $dir;
68 if (!is_dir($dir)) {
70 org_tubepress_impl_log_Log::log($prefix, '<tt>%s</tt> is not a directory', $realDir);
83 }
85 if (!is_dir($dir . DIRECTORY_SEPARATOR . $file)) {
87 continue;
DbMapper.php (https://github.com/mingomax/Zend-Db-Model-Creation.git) PHP · 377 lines
1 <?php
3 class My_Scripts_DbMapper extends My_Scripts_ModelCreation
21 protected function setupDbMapperFolder()
22 {
23 if (!is_dir($this->_path)) {
24 mkdir($this->_path, 0755);
25 $this->_logger->info('Mappers Folder Created <br />');
79 '$this->_dbTable = $dbTable;' . "\n" .
80 'return $this;',
81 'docblock' => new Zend_CodeGenerator_Php_Docblock(array(
82 'shortDescription' => 'setDbTable',
83 'tags' => array(
84 new Zend_CodeGenerator_Php_Docblock_Tag_Param(array(
85 'paramName' => 'dbTable',
86 'datatype' => 'object',
MemoryManagerTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 200 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: MemoryManagerTest.php 20804 2010-02-01 15:49:16Z alexander $
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Memory_MemoryManagerTest::main');
28 * Test helper
29 */
30 require_once dirname(__FILE__) . '/../../TestHelper.php';
32 /** Zend_Memory */
ZipTest.php (https://github.com/MontmereLimited/zf2.git) PHP · 300 lines
1 <?php
2 /**
3 * Zend Framework
32 * @license http://framework.zend.com/license/new-bsd New BSD License
33 */
34 class ZipTest extends \PHPUnit_Framework_TestCase
35 {
36 public function setUp()
56 foreach($files as $file) {
57 if (file_exists($file)) {
58 if (is_dir($file)) {
59 rmdir($file);
60 } else {
90 foreach($files as $file) {
91 if (file_exists($file)) {
92 if (is_dir($file)) {
93 rmdir($file);
94 } else {
RarTest.php (https://github.com/zucchi/zf2.git) PHP · 304 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
19 * @group Zend_Filter
20 */
21 class RarTest extends \PHPUnit_Framework_TestCase
22 {
23 public function setUp()
41 foreach ($files as $file) {
42 if (file_exists($file)) {
43 if (is_dir($file)) {
44 rmdir($file);
45 } else {
73 foreach ($files as $file) {
74 if (file_exists($file)) {
75 if (is_dir($file)) {
76 rmdir($file);
77 } else {
Rename.php (https://github.com/gryzz/crystal_magento.git) PHP · 305 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Rename.php 16971 2009-07-22 18:05:45Z mikaelkael $
20 */
23 * @see Zend_Filter_Interface
24 */
25 #require_once 'Zend/Filter/Interface.php';
27 /**
59 $options = array('target' => $options);
60 } elseif (!is_array($options)) {
61 #require_once 'Zend/Filter/Exception.php';
62 throw new Zend_Filter_Exception('Invalid options argument provided to filter');
63 }
File.php (https://github.com/testruby/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 397 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: File.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
22 */
25 * @see Zend_OpenId_Provider_Storage
26 */
27 require_once "Zend/OpenId/Provider/Storage.php";
29 /**
69 }
70 $this->_dir = $dir;
71 if (!is_dir($this->_dir)) {
72 if (!@mkdir($this->_dir, 0700, 1)) {
73 throw new Zend_OpenId_Exception(
Config.php (https://github.com/timglabisch/pimcore.git) PHP · 231 lines
Rar.php (https://github.com/timglabisch/pimcore.git) PHP · 252 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Rar.php 24593 2012-01-05 20:35:02Z matthew $
20 */
23 * @see Zend_Filter_Compress_CompressAbstract
24 */
25 // require_once 'Zend/Filter/Compress/CompressAbstract.php';
27 /**
61 {
62 if (!extension_loaded('rar')) {
63 // require_once 'Zend/Filter/Exception.php';
64 throw new Zend_Filter_Exception('This filter needs the rar extension');
65 }
Asset.php (https://github.com/wuts/starflower.git) PHP · 338 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * Code Igniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
268 foreach( array_keys(Modules::$locations) as $path)
269 {
270 if(is_dir($path . $module_name))
271 {
272 $asset_location .= str_replace(APPPATH, '', $path).$module_name.'/';
335 // END Asset Class
337 /* End of file Asset.php */
338 /* Location: ./application/libraries/Asset.php */
gcb-settings.php (https://github.com/Genesis-Simple/Genesis-Simple-Plugin.git) PHP · 194 lines
70 <?php screen_icon( 'plugins' ); ?>
71 <h2 id="top-buttons">
72 <?php _e('Genesis Background Settings', GCB_DOMAIN ); ?>
73 <input type="submit" class="button-primary" value="<?php _e('Save Settings', GCB_DOMAIN ) ?>" />
139 <h4><?php _e( 'Selected Default Background' , GCB_DOMAIN ); ?></h4>
140 <div id="custom-background-image" style="<?php echo $bg_styles; ?>"><?php // must be double quote, see above ?>
141 <p style="visibility:hidden;"><?php _e( 'default' , GCB_DOMAIN ); ?></p>
178 ?>
179 <div id="custom-background-image" style="<?php echo $bg_styles; ?>"><?php // must be double quote, see above ?>
181 <input type="radio" class="cbi-option" id="<?php echo GCB_SETTINGS_FIELD; ?>[cb_default]" name="<?php echo GCB_SETTINGS_FIELD; ?>[cb_default]"
182 value="<?php echo $folder .'-' . $fkey . '-' . $i; ?>" <?php checked( $folder .'-' . $fkey . '-' . $i , $setting ); ?>>
183 <p style="visibility:hidden;"><?php _e( ucfirst( $folder ) . ' ' . ucfirst( $fkey ) , GCB_DOMAIN ); ?></p>
TestsGeneratorTest.php (https://github.com/masicek/XSLT-Benchmarking-XSLTMark-II.git) PHP · 173 lines
1 <?php
3 /**
10 namespace Tests\XSLTBenchmarking\TestsGenerator;
12 require_once ROOT_TOOLS . '/RunnerConsole/Runner.php';
14 use \Tests\XSLTBenchmarking\TestCase;
48 // check not existence of tests
49 $this->assertFalse(is_dir($this->setDirSep($tests . '/modify-element-rename')));
50 $this->assertFalse(is_dir($this->setDirSep($tests . '/modify-element-remove')));
51 $this->assertFalse(is_dir($this->setDirSep($tests . '/modify-element-copy')));
52 $this->assertFalse(is_dir($this->setDirSep($tests . '/value-to-attribute-first')));
AccessControllerTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 161 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: AccessControllerTest.php 23775 2011-03-01 17:25:24Z ralph $
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Memory_AccessControllerTest::main');
27 /** Zend_Memory */
28 require_once 'Zend/Memory.php';
30 /**
lib.php (https://github.com/viggof/moodle.git) PHP · 135 lines
Serializer.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 172 lines
1 <?php
3 class HTMLPurifier_DefinitionCache_Serializer extends
110 private function _prepareDir($config) {
111 $directory = $this->generateDirectoryPath($config);
112 if (!is_dir($directory)) {
113 $base = $this->generateBaseDirectoryPath($config);
114 if (!is_dir($base)) {
136 // early abort, if it is writable, everything is hunky-dory
137 if (is_writable($dir)) return true;
138 if (!is_dir($dir)) {
139 // generally, you'll want to handle this beforehand
140 // so a more specific error message can be given
152 $chmod = '775';
153 } else {
154 // PHP's probably running as nobody, so we'll
155 // need to give global permissions
156 $chmod = '777';
DiskKeyCache.php (https://gitlab.com/isdzulqor/Slis-Dev) PHP · 324 lines
1 <?php
3 /*
255 $this->clearKey($nsKey, $itemKey);
256 }
257 if (is_dir($this->_path.'/'.$nsKey)) {
258 rmdir($this->_path.'/'.$nsKey);
259 }
270 {
271 $cacheDir = $this->_path.'/'.$nsKey;
272 if (!is_dir($cacheDir)) {
273 if (!mkdir($cacheDir)) {
274 throw new Swift_IoException('Failed to create cache directory '.$cacheDir);
ClassPreloader.php (https://gitlab.com/ealexis.t/trends) PHP · 181 lines
17 use PhpParser\Parser;
18 use PhpParser\PrettyPrinter\Standard as PrettyPrinter;
19 use RuntimeException;
75 public function prepareOutput($output, $strict = false)
76 {
77 if ($strict && version_compare(PHP_VERSION, '7') < 1) {
78 throw new RuntimeException('Strict mode requires PHP 7 or greater.');
81 $dir = dirname($output);
83 if (!is_dir($dir) && !mkdir($dir, 0777, true)) {
84 throw new RuntimeException("Unable to create directory $dir.");
85 }
129 $pretty = $this->printer->prettyPrint($stmts);
131 if (substr($pretty, 30) === '<?php declare(strict_types=1);' || substr($pretty, 30) === "<?php\ndeclare(strict_types=1);") {
132 $pretty = substr($pretty, 32);
133 } elseif (substr($pretty, 31) === "<?php\r\ndeclare(strict_types=1);") {
admin.php (https://github.com/abir/pyrocms.git) PHP · 277 lines
1 <?php
2 /**
3 * Modules controller, lists all installed modules
27 // Check the referrer
28 parse_url($this->input->server('HTTP_REFERER'), PHP_URL_HOST) == parse_url(base_url(), PHP_URL_HOST) or show_error('Invalid Referrer');
29 }
77 // Now try to unzip
78 $this->load->library('unzip');
79 $this->unzip->allow(array('xml', 'html', 'css', 'js', 'png', 'gif', 'jpeg', 'jpg', 'swf', 'ico', 'php'));
81 // Try and extract
263 return @unlink($str);
264 }
265 elseif (is_dir($str))
266 {
267 $scan = glob(rtrim($str,'/').'/*');
main_template_vars_images_additional.php (https://github.com/severnaya99/Sg-2010.git) PHP · 116 lines
1 <?php
2 //
3 // +----------------------------------------------------------------------+
6 // | Copyright (c) 2003 The zen-cart developers |
7 // | |
8 // | http://www.zen-cart.com/index.php |
9 // | |
10 // | Portions Copyright (c) 2003 osCommerce |
18 // | license@zen-cart.com so we can mail you a copy immediately. |
19 // +----------------------------------------------------------------------+
20 // $Id: main_template_vars_images_additional.php 1163 2005-04-10 19:32:18Z drbyte $
21 //
22 ?>
23 <?php
24 if ($products_image != '') {
25 // prepare image name
main_template_vars_images_additional.php (https://github.com/severnaya99/Sg-2010.git) PHP · 116 lines
1 <?php
2 //
3 // +----------------------------------------------------------------------+
6 // | Copyright (c) 2004 The zen-cart developers |
7 // | |
8 // | http://www.zen-cart.com/index.php |
9 // | |
10 // | Portions Copyright (c) 2003 osCommerce |
18 // | license@zen-cart.com so we can mail you a copy immediately. |
19 // +----------------------------------------------------------------------+
20 // $Id: main_template_vars_images_additional.php 1163 2005-04-10 19:32:18Z drbyte $
21 //
22 ?>
23 <?php
24 if ($products_image != '') {
25 // prepare image name
file.php (https://bitbucket.org/kawadatetsuya/twilio.git) PHP · 207 lines
1 <?php
3 namespace Fuel\Core;
64 /**
65 * Parses a string using all of the previously set variables. Allows you to
66 * use something like %APPPATH% in non-PHP files.
67 *
68 * @param string $string String to parse
81 /**
82 * Replaces FuelPHP's path constants to their string counterparts.
83 *
84 * @param array $array array to be prepped
186 $path = pathinfo($path);
187 if ( ! is_dir($path['dirname']))
188 {
189 mkdir($path['dirname'], 0777, true);
FileTest.php (https://github.com/hojincong/zf2.git) PHP · 219 lines
1 <?php
2 /**
3 * Zend Framework
41 * @group Zend_OpenId
42 */
43 class FileTest extends \PHPUnit_Framework_TestCase
44 {
45 const HANDLE = "d41d8cd98f00b204e9800998ecf8427e";
48 const USER = "test_user";
49 const PASSWORD = "01234567890abcdef";
50 const SITE1 = "http://www.php.net/";
51 const SITE2 = "http://www.yahoo.com/";
61 @rmdir($dir);
62 $storage = new Storage\File($dir);
63 $this->assertTrue( is_dir($dir) );
65 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
Storage.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 382 lines
1 <?php
3 /**
36 protected function checkDiskExiste($value)
37 {
38 return is_dir(Sys::$app."/storage/file/".$value);
39 }
41 protected function isDir($value)
42 {
43 return is_dir($this->storagePath."/".$value);
44 }
280 $r=scandir($this->path($name));
281 foreach ($r as $key => $value) {
282 if(is_dir($this->storagePath."/".$value)) $files[]=$value;
283 }
284 return $files;
Help.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 252 lines
1 <?php
3 /**
4 * Help.inc.php
5 *
6 * Copyright (c) 2003-2006 John Willinsky
11 * Provides methods for translating help topic keys to their respected topic help id
12 *
13 * $Id: Help.inc.php,v 1.7 2006/06/12 23:25:51 alec Exp $
14 */
225 /**
226 * Returns the most recent modified file in the specified directory
227 * Taken from the php.net site under filemtime
228 * @param $dirName string
229 * @param $doRecursive bool
engine.php (https://github.com/Hywan/atoum.git) PHP · 256 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\scripts\tagger;
5 use mageekguy\atoum;
7 require_once __DIR__ . '/../../../runner.php';
9 class engine extends atoum\test
82 ->string($this->testedInstance->getSrcDirectory())->isEqualTo($otherDirectory)
83 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
84 ->object($this->testedInstance->setSrcDirectory($otherDirectory = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance
85 ->string($this->testedInstance->getSrcDirectory())->isEqualTo((string) $otherDirectory)
86 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
97 ->object($this->testedInstance->setDestinationDirectory(($directory = uniqid()) . \DIRECTORY_SEPARATOR))->isTestedInstance
98 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo($directory)
99 ->object($this->testedInstance->setDestinationDirectory($directory = rand(- PHP_INT_MAX, PHP_INT_MAX)))->isTestedInstance
100 ->string($this->testedInstance->getDestinationDirectory())->isEqualTo((string) $directory)
101 ;
BaseTestRunner.php (https://github.com/joac/sugarcrm_dev.git) PHP · 190 lines
1 <?php
2 /**
3 * PHPUnit
4 *
5 * Copyright (c) 2002-2011, Sebastian Bergmann <sebastian@phpunit.de>.
6 * All rights reserved.
7 *
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Runner
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
40 * @copyright 2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
File.php (https://github.com/apurvgupta12/Ushahidi_Web.git) PHP · 245 lines
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * File-based Cache driver.
4 *
5 * $Id: File.php 3917 2009-01-21 03:06:22Z zombor $
6 *
7 * @package Cache
8 * @author Kohana Team
9 * @copyright (c) 2007-2008 Kohana Team
10 * @license http://kohanaphp.com/license.html
11 */
12 class Cache_File_Driver implements Cache_Driver {
24 // Make sure the cache directory is writable
25 if ( ! is_dir($directory) OR ! is_writable($directory))
26 throw new Kohana_Exception('cache.unwritable', $directory);
MaildirMessageOldTest.php (https://github.com/leerbag/zf2.git) PHP · 187 lines
1 <?php
2 /**
3 * Zend Framework
52 * @group Zend_Mail
53 */
54 class MaildirMessageOldTest extends \PHPUnit_Framework_TestCase
55 {
56 protected $_originalMaildir;
61 {
62 $this->_originalMaildir = __DIR__ . '/_files/test.maildir/';
63 if (!is_dir($this->_originalMaildir . '/cur/')) {
64 $this->markTestSkipped('You have to unpack maildir.tar in Zend/Mail/_files/test.maildir/ '
65 . 'directory before enabling the maildir tests');
mf_install.php (https://github.com/leocaseiro/Magic-Fields-2.git) PHP · 212 lines
1 <?php
2 /**
3 * This file content the routines for install/activate uninstall/deactivate Magic Fields
8 global $wpdb;
10 require_once(ABSPATH.'wp-admin/includes/upgrade.php');
12 // Get collation info
121 wp_mkdir_p(MF_CACHE_DIR);
123 if (!is_dir(MF_CACHE_DIR)){
124 $dir_list2.= "<li>".MF_CACHE_DIR . "</li>";
125 }elseif (!is_writable(MF_CACHE_DIR)){
127 }
129 if (!is_dir(MF_FILES_DIR)){
130 $dir_list2.= "<li>".MF_FILES_DIR . "</li>";
131 }elseif (!is_writable(MF_FILES_DIR)){
FileProfilerStorage.php (https://github.com/Faianca/symfony.git) PHP · 223 lines
TarTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 271 lines
1 <?php
2 /**
3 * Zend Framework
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Filter_Compress_TarTest::main');
28 * @see Zend_Filter_Compress_Tar
29 */
30 require_once 'Zend/Filter/Compress/Tar.php';
32 /**
38 * @license http://framework.zend.com/license/new-bsd New BSD License
39 */
40 class Zend_Filter_Compress_TarTest extends PHPUnit_Framework_TestCase
41 {
42 /**
Filesystem.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 442 lines
TestFiles.php (https://github.com/orchestra-io/sample-openx.git) PHP · 142 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: TestFiles.php 38974 2009-06-29 13:20:41Z david.keen $
26 */
66 }
67 // Is the file another directory?
68 if (is_dir($dir . '/' . $file)) {
69 // In recursive mode, so add in all tests found in this sub-directory
70 $aFiles = array_merge($aFiles, TestFiles::getTestFiles($type, $code, $dir . '/' . $file));
79 while (($file = readdir($dh)) !== false) {
80 // Does the filename match?
81 if (preg_match("/[^.]+\.$code\.test\.php/", $file)) {
82 // Strip the MAX_PROJECT_PATH from the folder before storing
83 $storeFolder = preg_replace('#' . str_replace('\\', '\\\\', MAX_PROJECT_PATH) . '/#', '', $dir);
IgnoreDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 172 lines
✨ Summary
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
68 ButtonGroup bg = new ButtonGroup();
69 final JRadioButton this_file_btn = new JRadioButton( jEdit.getProperty( "ips.This_file", "This file" ) );
70 final JRadioButton this_dir_btn = new JRadioButton( jEdit.getProperty( "ips.This_directory", "This directory" ) );
71 final JRadioButton this_dir_pattern_btn = new JRadioButton( jEdit.getProperty( "ips.Files_in_this_directory_with_this_pattern>", "Files in this directory with this pattern:" ) );
75 }
76 else {
77 bg.add( this_dir_btn );
78 this_dir_btn.setSelected(true);
79 }
80 bg.add( this_dir_pattern_btn );
82 final JTextField pattern_field = new JTextField();
96 // actions
97 this_dir_pattern_btn.addChangeListener(
98 new ChangeListener() {
99 public void stateChanged( ChangeEvent ae ) {
users-guide.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 711 lines
604 available from jedit repository. The documentation is generated using docbook xsl.
605 </para>
606 <para>Some tests are included. They are based upon <ulink url="http://fest.easytesting.org/swing/wiki/pmwiki.php">FEST-swing</ulink>
607 for GUI testing. Otherwise they are plain <ulink url="http://www.junit.org/">jUnit</ulink> tests.
608 To run the tests, <command>cd</command> to the plugin root directory and type <command>ant test</command>.
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>