100+ results for 'php unlink'
Not the results you expected?
translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines
1 <?php
3 /**
100 $translations = array_intersect_key( $translations, array_flip( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ); // keep only valid languages slugs as keys
102 // unlink removed translations
103 $old_translations = $this->get_translations( $id );
104 foreach ( array_diff_assoc( $old_translations, $translations ) as $object_id ) {
DevelErrorHandlerTest.php (https://gitlab.com/Drulenium-bot/devel) PHP · 213 lines
1 <?php
3 namespace Drupal\devel\Tests;
51 // Ensures that selecting the DEVEL_ERROR_HANDLER_NONE option no error
52 // (raw or message) is shown on the site in case of php errors.
53 $edit = [
54 'error_handlers[]' => DEVEL_ERROR_HANDLER_NONE,
69 // Ensures that selecting the DEVEL_ERROR_HANDLER_BACKTRACE_KINT option a
70 // backtrace above the rendered page is shown on the site in case of php
71 // errors.
72 $edit = [
86 // Ensures that selecting the DEVEL_ERROR_HANDLER_BACKTRACE_DPM option a
87 // backtrace in the message area is shown on the site in case of php errors.
88 $edit = [
89 'error_handlers[]' => DEVEL_ERROR_HANDLER_BACKTRACE_DPM,
categories.php (https://github.com/tomtom127/oscommerce.git) PHP · 247 lines
RenameTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 473 lines
1 <?php
2 /**
3 * Zend Framework
21 */
23 if (!defined("PHPUnit_MAIN_METHOD")) {
24 define("PHPUnit_MAIN_METHOD", "Zend_Filter_File_RenameTest::main");
28 * @see Zend_Filter_File_Rename
29 */
30 require_once 'Zend/Filter/File/Rename.php';
32 /**
38 * @group Zend_Filter
39 */
40 class Zend_Filter_File_RenameTest extends PHPUnit_Framework_TestCase
41 {
42 /**
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 }
181 * @link https://github.com/composer/composer/issues/3157
182 */
183 public function testUnlinkSymlinkedDirectory()
184 {
185 $tmp = sys_get_temp_dir();
Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines
vfsStreamWrapperFileTestCase.php (https://github.com/acoulton/vfsStream.git) PHP · 335 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamWrapper.
9 require_once 'org/bovigo/vfs/vfsStream.php';
10 require_once 'PHPUnit/Framework/TestCase.php';
11 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';
315 vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
316 vfsStream::newFile('new.txt', 0000)->at(vfsStreamWrapper::getRoot());
317 $this->assertFalse(unlink(vfsStream::url('root/new.txt')));
318 $this->assertTrue(file_exists(vfsStream::url('root/new.txt')));
319 }
329 vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
330 vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot());
331 $this->assertFalse(unlink(vfsStream::url('root/new.txt')));
332 $this->assertTrue(file_exists(vfsStream::url('root/new.txt')));
333 }
FUXmlWriter.cpp (https://bitbucket.org/ardalanaz/dava.framework.git) C++ · 259 lines
smarty_internal_cacheresource_file.php (https://github.com/SquattingSasquatches/Lucidity.git) PHP · 264 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 $cached->timestamp = @filemtime($cached->filepath);
65 $cached->exists = !!$cached->timestamp;
212 continue;
213 }
214 $_count += @unlink((string) $_file) ? 1 : 0;
215 }
216 }
228 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
229 {
230 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
231 clearstatcache(true, $cached->lock_id);
232 } else {
smarty_internal_cacheresource_file.php (https://github.com/GuessWho/don-t-enter.git) PHP · 259 lines
1 <?php
2 /**
3 * Smarty Internal Plugin CacheResource File
61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
62 }
63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
64 Smarty::muteExpectedErrors();
65 $cached->timestamp = @filemtime($cached->filepath);
207 continue;
208 }
209 $_count += @unlink((string) $_file) ? 1 : 0;
210 }
211 }
223 public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
224 {
225 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
226 clearstatcache(true, $cached->lock_id);
227 } else {
ZoneServiceImpl.php (https://bitbucket.org/blackriver/openx.git) PHP · 375 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: ZoneServiceImpl.php 81772 2012-09-11 00:07:29Z chris.nutting $
26 */
34 // Base class BaseLogonService
35 require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';
37 // Zone Dll class
38 require_once MAX_PATH . '/lib/OA/Dll/Zone.php';
40 /**
ZoneServiceImpl.php (https://github.com/skynet/OpenX-2.8.7.git) PHP · 375 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: ZoneServiceImpl.php 62345 2010-09-14 21:16:38Z chris.nutting $
26 */
34 // Base class BaseLogonService
35 require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';
37 // Zone Dll class
38 require_once MAX_PATH . '/lib/OA/Dll/Zone.php';
40 /**
File.php (https://github.com/gryzz/crystal_magento.git) PHP · 460 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 16212 2009-06-21 19:24:49Z thomas $
22 */
25 * @see Zend_OpenId_Consumer_Storage
26 */
27 #require_once "Zend/OpenId/Consumer/Storage.php";
29 /**
74 * @see Zend_OpenId_Exception
75 */
76 #require_once 'Zend/OpenId/Exception.php';
77 throw new Zend_OpenId_Exception(
78 'Cannot access storage directory ' . $dir,
Service.java (https://bitbucket.org/pau-minoves/opennaas.git) Java · 364 lines
controller.php (https://github.com/Hywan/atoum.git) PHP · 479 lines
list_test.c (http://embox.googlecode.com/svn/trunk/embox/) C · 528 lines
191 }
193 TEST_CASE("list_unlink on a single element list should make the list empty "
194 "and element alone again") {
195 list_add_first(element_in_list, &x, &m);
197 list_unlink(element_in_list, &x);
199 test_assert_true(list_is_empty(&m));
201 }
203 TEST_CASE("single list_unlink and subsequent list_add_first to another list "
204 "should make the first list empty but an element not alone") {
205 test_assert_not_equal(&m, &n);
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
151 if ( $this->isFile( $path ) ) {
152 wfSuppressWarnings();
153 $result = (bool)unlink( $path );
154 wfRestoreWarnings();
155 return $result;
Storage.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 382 lines
1 <?php
3 /**
165 if($this->exists($name))
166 {
167 return unlink($this->path($name));
168 }
169 else throw new InvalidArgumentException("There is no file calls $name");
176 if($self->exists($name))
177 {
178 return unlink ($self->path($name));
179 }
180 else throw new InvalidArgumentException("There is no file calls $name");
Task.php (https://github.com/ohapps/TaskConsole.git) PHP · 422 lines
source_code.php (https://github.com/F5/zetacomponents.git) PHP · 317 lines
161 * Initialises the source object with the code and output context.
162 *
163 * @param string $stream The actual PHP stream path for the template source
164 * file.
165 * @param string $resource The requested resource string, if false $stream
181 /**
182 * Loads the data from the PHP stream into the $code member variable.
183 *
184 * @throws ezcTemplateFileNotFoundException if the file does not exist on disk.
233 !unlink( $backupName ) )
234 {
235 unlink( $tempName );
236 throw new ezcTemplateFileFailedUnlinkException( $backupName );
258 *
259 * @throws ezcTemplateFileNotFoundException if the file does not exist on disk.
260 * @throws ezcTemplateFileFailedUnlinkException if the file could not be unlinked.
261 *
262 *
Rename.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 326 lines
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 }
ContainerI.java (https://github.com/ximenesuk/openmicroscopy.git) Java · 254 lines
34 import omero.api.AMD_IContainer_loadContainerHierarchy;
35 import omero.api.AMD_IContainer_retrieveCollection;
36 import omero.api.AMD_IContainer_unlink;
37 import omero.api.AMD_IContainer_updateDataObject;
38 import omero.api.AMD_IContainer_updateDataObjects;
202 }
204 public void unlink_async(AMD_IContainer_unlink __cb, List<IObject> links,
205 Parameters options, Current __current) throws ServerError {
206 IceMapper mapper = new IceMapper(IceMapper.VOID);
test7.c (https://bitbucket.org/toponado/nfs-proxy.git) C · 306 lines
Stream.php (https://bitbucket.org/gencer/zf2.git) PHP · 298 lines
glui_treepanel.cpp (https://github.com/RudyAramayo/iOSOpenGLBulletPhysics.git) C++ · 388 lines
func_attachments.php (https://github.com/sidisinsane/TrellisDesk.git) PHP · 260 lines
1 <?php
3 /**
188 foreach ( $files as &$f )
189 {
190 @unlink( $this->trellis->cache->data['settings']['general']['upload_dir'] . $f['real_name'] );
191 }
204 if ( ! $f = $this->get_single_by_id( array( 'real_name' ), $ids ) ) return false;
206 if ( ! @unlink( $this->trellis->cache->data['settings']['general']['upload_dir'] . $f['real_name'] ) ) return false;
208 $this->trellis->db->construct( array(
ZoneServiceImpl.php (https://github.com/yabba/openx.git) PHP · 379 lines
1 <?php
3 /*
34 // Base class BaseLogonService
35 require_once MAX_PATH . '/www/api/v2/common/BaseServiceImpl.php';
37 // Zone Dll class
38 require_once MAX_PATH . '/lib/OA/Dll/Zone.php';
40 /**
343 }
345 function unlinkBanner($sessionId, $zoneId, $bannerId)
346 {
347 if ($this->verifySession($sessionId)) {
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;
108 foreach ($files as $file)
109 {
110 if (strpos($file, '.file.test.tpl.xslt.php') !== FALSE)
111 {
112 unlink($this->setDirSep($tmp . '/' . $file));
113 }
114 }
115 unlink($this->setDirSep($tmp . '/modify-element/manyElements.xml'));
116 unlink($this->setDirSep($tmp . '/modify-element/manyNewElements.xml'));
PhpGeneratorDumperTest.php (https://github.com/deviantintegral/symfony.git) PHP · 177 lines
28 /**
29 * @var PhpGeneratorDumper
30 */
31 private $generatorDumper;
48 $this->generatorDumper = new PhpGeneratorDumper($this->routeCollection);
49 $this->testTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php';
50 $this->largeTestTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.large.php';
82 $this->assertEquals('http://localhost/app.php/testing2', $absoluteUrlWithoutParameter);
83 $this->assertEquals('/app.php/testing/bar', $relativeUrlWithParameter);
84 $this->assertEquals('/app.php/testing2', $relativeUrlWithoutParameter);
166 $this->assertEquals('ftp://localhost/app.php/testing', $absoluteUrl);
167 $this->assertEquals('ftp://localhost/app.php/testing', $relativeUrl);
169 $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https'));
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 /**
169 } else {
170 fclose($f);
171 @unlink($name);
172 fclose($lock);
173 return false;
Stream.php (https://bitbucket.org/cviolette/sugarcrm.git) PHP · 246 lines
file.php (https://github.com/akutaktau/feedmalaya.git) PHP · 351 lines
1 <?php
2 /**
3 * Fuel
4 *
5 * Fuel is a fast, lightweight, community driven PHP5 framework.
6 *
7 * @package Fuel
10 * @license MIT License
11 * @copyright 2010 - 2011 Fuel Development Team
12 * @link http://fuelphp.com
13 */
178 filemtime($this->config['path'] . $file) < $expire)
179 {
180 @unlink($this->config['path'] . $file);
181 }
182 }
upload_02.php (https://bitbucket.org/hocarvalho/wroisite.git) PHP · 428 lines
1 <?php
2 require_once 'include/plugins/phpthumb-latest/ThumbLib.inc.php';
4 if(isset($_FILES['imagem1']) && is_uploaded_file($_FILES['imagem1']['tmp_name'])){
51 else {
53 $thumb = PhpThumbFactory::create($diretorio.$name_file_1);
54 $thumb->resize($largura_thumb, $altura_thumb)->save($diretorio.'/thumb/'.$name_file_1);
121 else {
123 $thumb = PhpThumbFactory::create($diretorio.$name_file_2);
124 $thumb->resize($largura_thumb, $altura_thumb)->save($diretorio.'/thumb/'.$name_file_2);
191 else {
193 $thumb = PhpThumbFactory::create($diretorio.$name_file_3);
194 $thumb->resize($largura_thumb, $altura_thumb)->save($diretorio.'/thumb/'.$name_file_3);
parentnode.c (https://github.com/php/php-src.git) C · 411 lines
1 /*
2 +----------------------------------------------------------------------+
3 | PHP Version 7 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | https://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
15 | Authors: Benjamin Eberlei <beberlei@php.net> |
SerializerTest.php (https://gitlab.com/makkooz/nikestreetbeat) PHP · 229 lines
1 <?php
3 class HTMLPurifier_DefinitionCache_SerializerTest extends HTMLPurifier_DefinitionCacheHarness
8 // XXX SimpleTest does some really crazy stuff in the background
9 // to do equality checks. Unfortunately, this makes some
10 // versions of PHP segfault. So we need to define a better,
11 // homebrew notion of equality and use that instead. For now,
12 // the identical asserts are commented out.
24 $config_md5 . '.ser'
25 );
26 if($file && file_exists($file)) unlink($file); // prevent previous failures from causing problems
28 $this->assertIdentical($config_md5, $cache->generateKey($config));
199 $this->assertFileExist($dir . '/Test/1.0.0,serial,1.ser');
201 unlink($dir . '/Test/1.0.0,serial,1.ser');
202 rmdir( $dir . '/Test');
Config.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 211 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_Connect
23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
59 }
60 if($ftp) {
61 @unlink($config->getFilename());
62 }
63 $data = array($command => array('data'=>$values));
FsExplorer.class.php (https://github.com/tengle1080/tubepress.git) PHP · 163 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',
154 if ( $tempfile ) {
155 $tempdir = realpath(dirname($tempfile));
156 @unlink($tempfile);
157 return $tempdir;
158 } else {
Config.php (https://bitbucket.org/mkrasuski/magento-ce.git) PHP · 211 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_Connect
23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
59 }
60 if($ftp) {
61 @unlink($config->getFilename());
62 }
63 $data = array($command => array('data'=>$values));
ModelTest.java (https://github.com/will-moore/openmicroscopy.git) Java · 254 lines
admin.php (https://bitbucket.org/adatux_/uakami.git) PHP · 164 lines
1 <?php
2 // Direct calls to this file are Forbidden when core files are not present
3 if (!function_exists ('add_action')) {
52 // Load scripts and styles only on BPS specified pages
53 add_action('load-bulletproof-security/admin/options.php', 'bulletproof_security_load_settings_page');
55 }
64 add_menu_page(__('BulletProof Security ~ htaccess Core', 'bulletproof-security'), __('BPS Security', 'bulletproof-security'), 'manage_options', 'bulletproof-security/admin/options.php', '', plugins_url('bulletproof-security/admin/images/bps-icon-small.png'));
65 add_submenu_page('bulletproof-security/admin/options.php', __('BulletProof Security ~ htaccess Core', 'bulletproof-security'), __('BPS Settings', 'bulletproof-security'), 'manage_options', 'bulletproof-security/admin/options.php' );
66 }}
95 }
97 // Uninstall - do not unlink .htaccess files on uninstall to prevent catastrophic user errors
98 function bulletproof_security_uninstall() {
99 require_once( ABSPATH . 'wp-admin/includes/plugin.php');
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 );
250 }
252 return @unlink( $path );
253 }
263 $key = $this->get_item_key( $key );
264 $path = $this->_cache_dir . DIRECTORY_SEPARATOR . $this->_get_path( $key );
265 return @unlink( $path );
266 }
sqlite_forge.php (https://github.com/randell/MMDA-Sign-Generator.git) PHP · 265 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
50 function _drop_database($name)
51 {
52 if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
53 {
54 if ($this->db->db_debug)
89 {
90 // Numeric field names aren't allowed in databases, so if the key is
91 // numeric, we know it was assigned by PHP and the developer manually
92 // entered the field information, so we'll simply add it to the list
93 if (is_numeric($field))
files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines
8 * For full copyright and license information, please see the docs/CREDITS.txt file.
9 *
10 * @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> http://www.phpfastcache.com
11 * @author Georges.L (Geolim4) <contact@geolim4.com>
12 *
13 */
15 namespace phpFastCache\Drivers;
17 use phpFastCache\Core\DriverAbstract;
18 use phpFastCache\Exceptions\phpFastCacheDriverException;
20 /**
57 * @param bool $skip
58 * @return string
59 * @throws phpFastCacheDriverException
60 */
61 private function getFilePath($keyword, $skip = false)
gift.php (https://github.com/pinhao/giftweb.git) PHP · 171 lines
1 <?php
2 defined('BASEPATH') OR exit('No direct script access allowed');
9 *
10 */
11 require APPPATH.'/libraries/REST_Controller.php';
12 require APPPATH.'/libraries/GIFTLib.php';
93 $this->errorResponse(array(array('msg'=>'Image File invalid')));
94 if ( is_file($uploadData['full_path']) === TRUE ) {
95 unlink($uploadData['full_path']);
96 }
97 }
SafeStream.php (https://github.com/langpavel/nette.git) PHP · 309 lines
1 <?php
3 /**
24 * $content = file_get_contents('safe://myfile.txt');
25 *
26 * unlink('safe://myfile.txt');
27 * </code>
28 *
165 fclose($this->handle);
166 if ($this->deleteFile) {
167 unlink($this->file);
168 }
169 if ($this->tempHandle) {
191 fclose($this->tempHandle);
193 if ($this->writeError /*5.2*|| !(substr(PHP_OS, 0, 3) === 'WIN' ? unlink($this->file) : TRUE)*/
194 || !rename($this->tempFile, $this->file) // try to rename temp file
195 ) {
upgrade.php (https://github.com/jfilip/moodle.git) PHP · 154 lines
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';
BaseDmTestCategForm.class.php (https://github.com/ardi-n/diem.git) PHP · 294 lines
class_image_imagick.php (https://github.com/dmi3yy/modx.evo.custom.git) PHP · 303 lines
1 <?php
3 /** This file is part of KCFinder project
8 * @author Pavel Tzonkov <sunhater@sunhater.com>
9 * @copyright 2010-2014 KCFinder Project
10 * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
11 * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
274 $this->image->writeImage($file);
275 } catch (Exception $e) {
276 @unlink($file);
277 return false;
278 }
280 if (!@rename($file, $options['file'])) {
281 @unlink($file);
282 return false;
283 }
BaseaPageForm.class.php (https://github.com/malacon/rbwords.git) PHP · 177 lines
1 <?php
3 /**
9 * @subpackage form
10 * @author Your name here
11 * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
12 */
13 abstract class BaseaPageForm extends BaseFormDoctrine
127 if (count($unlink))
128 {
129 $this->object->unlink('aSearchDocuments', array_values($unlink));
130 }
165 if (count($unlink))
166 {
167 $this->object->unlink('Categories', array_values($unlink));
168 }
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 }
WriteTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 210 lines
SplitElementTxn.cpp
(git://github.com/zpao/v8monkey.git)
C++ · 276 lines
✨ Summary
This C++ code implements a text splitting functionality for an HTML editor. It allows users to split a selected text into two separate nodes, one on the left and one on the right of the original node. The code provides methods for splitting, undoing, redoing, and manipulating the resulting nodes.
This C++ code implements a text splitting functionality for an HTML editor. It allows users to split a selected text into two separate nodes, one on the left and one on the right of the original node. The code provides methods for splitting, undoing, redoing, and manipulating the resulting nodes.
Storage.php (https://gitlab.com/wuhang2003/core) PHP · 326 lines
1 <?php
2 /**
3 * @author Björn Schießle <schiessle@owncloud.com>
131 public function deleteUserKey($uid, $keyId, $encryptionModuleId) {
132 $path = $this->constructUserKeyPath($encryptionModuleId, $keyId, $uid);
133 return !$this->view->file_exists($path) || $this->view->unlink($path);
134 }
139 public function deleteFileKey($path, $keyId, $encryptionModuleId) {
140 $keyDir = $this->getFileKeyDir($encryptionModuleId, $path);
141 return !$this->view->file_exists($keyDir . $keyId) || $this->view->unlink($keyDir . $keyId);
142 }
155 public function deleteSystemUserKey($keyId, $encryptionModuleId) {
156 $path = $this->constructUserKeyPath($encryptionModuleId, $keyId, null);
157 return !$this->view->file_exists($path) || $this->view->unlink($path);
158 }
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 */
video.php (https://bitbucket.org/ulisesrodriguez/imgvid.git) PHP · 241 lines
CmsCompoundObjectTest.php (https://gitlab.com/gideonmarked/wellmarketing) PHP · 259 lines
1 <?php
3 use Cms\Classes\Theme;
103 $filePath = $themePath .= '/temporary/testcompound.htm';
104 if (file_exists($filePath))
105 @unlink($filePath);
107 $this->assertFileNotExists($filePath);
172 $destFilePath = $theme->getPath().'/testobjects/compound-markup.htm';
173 if (file_exists($destFilePath))
174 unlink($destFilePath);
176 $this->assertFileNotExists($destFilePath);
196 $destFilePath = $theme->getPath().'/testobjects/compound-markup-settings.htm';
197 if (file_exists($destFilePath))
198 unlink($destFilePath);
200 $this->assertFileNotExists($destFilePath);
ImageTest.php (https://bitbucket.org/resourcemode/smodels.git) PHP · 344 lines
1 <?php
3 use Supa\Category\Service as CategoryService;
13 * @backupGlobals disabled
14 */
15 class ImageTest extends PHPUnit_Framework_TestCase {
17 public function tearDown() {
236 // ensure files do not exist in storage dir
237 @unlink('c:/wamp/www/smodels/smodels/images/product/bbc-olympic.png');
239 $_FILES = array(
277 // ensure files do not exist in storage dir
278 @unlink('c:/wamp/www/smodels/smodels/images/product/bbc-olympic.png');
280 $_FILES = array(
scanner.php (https://gitlab.com/Red54/core) PHP · 287 lines
1 <?php
2 /**
3 * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
148 $this->scanner->scan('');
149 $oldData = $this->cache->get('');
150 $this->storage->unlink('folder/bar.txt');
151 $this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')));
152 $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
187 $this->scanner->scan('');
188 $this->assertTrue($this->cache->inCache('foo.txt'));
189 $this->storage->unlink('foo.txt');
190 $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
191 $this->assertFalse($this->cache->inCache('foo.txt'));
208 $this->scanner->scan('');
209 $this->assertTrue($this->cache->inCache('folder/bar.txt'));
210 $this->storage->unlink('folder/bar.txt');
211 $this->scanner->scanFile('folder/bar.txt');
212 $this->assertFalse($this->cache->inCache('folder/bar.txt'));
Purge.php (https://github.com/opengeek/revolution.git) PHP · 228 lines
1 <?php
2 /*
3 * This file is part of MODX Revolution.
153 if (!file_exists($transportZip)) {
154 $this->modx->log(xPDO::LOG_LEVEL_ERROR, $this->modx->lexicon('package_remove_err_tzip_nf'));
155 } else if (!@unlink($transportZip)) {
156 $this->modx->log(xPDO::LOG_LEVEL_ERROR, $this->modx->lexicon('package_remove_err_tzip'));
157 } else {
plugins.js (https://github.com/baudehlo/Haraka.git) JavaScript · 270 lines
EncryptCommandController.php (https://github.com/liwo/Deploy-Package.git) PHP · 147 lines
1 <?php
2 declare(ENCODING = 'utf-8');
3 namespace TYPO3\Deploy\Command;
67 $targetFilename = $configuration . '.encrypted';
68 file_put_contents($targetFilename, $crypted);
69 unlink($configuration);
70 $this->outputLine('Sealed ' . $targetFilename);
71 }
99 $targetFilename = substr($configuration, 0, -strlen('.encrypted'));
100 file_put_contents($targetFilename, $data);
101 unlink($configuration);
102 $this->outputLine('Opened ' . $targetFilename);
103 }
DiskKeyCache.php (https://gitlab.com/techniconline/kmc) PHP · 323 lines
sqlite_forge.php (https://github.com/bwghughes/houghandco.git) PHP · 234 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
50 function _drop_database($name)
51 {
52 if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
53 {
54 if ($this->db->db_debug)
89 {
90 // Numeric field names aren't allowed in databases, so if the key is
91 // numeric, we know it was assigned by PHP and the developer manually
92 // entered the field information, so we'll simply add it to the list
93 if (is_numeric($field))
products_to_categories.php (https://github.com/bitweaver/commerce.git) PHP · 104 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 |
68 // remove category to category linked
69 define('TEXT_INFO_REMOVE_ALL_PRODUCTS_TO_CATEGORY_LINKED', '<strong>Remove ALL Products in a Category that are LINKED Products to another Category ...</strong><br />Example: Using 8 and 22 would Unlink ALL Products in Category 8 from Category 22');
70 define('TEXT_INFO_REMOVE_ALL_PRODUCTS_TO_CATEGORY_FROM_LINKED', 'Select All Products in Category: ');
71 define('TEXT_INFO_REMOVE_ALL_PRODUCTS_TO_CATEGORY_TO_LINKED', 'Remove from being Linked to Category: ');
upload.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 157 lines
1 <?php
2 /**
3 * class.wsBase.php
40 if (isset( $_POST["DOC_UID"] ) && $_POST["DOC_UID"] != - 1) {
41 //The document is of an Specific Input Document. Get path and Tag information
42 require_once ("classes/model/AppFolder.php");
43 require_once ("classes/model/InputDocument.php");
147 $oAppDocument->update( $aFields );
149 unlink( $sPathName . $sFileName );
150 }
151 }
indexer.php (https://github.com/tsep/tsep1.git) PHP · 285 lines
sqlite_forge.php (https://bitbucket.org/subhan_12/mwi-panel.git) PHP · 265 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
50 function _drop_database($name)
51 {
52 if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
53 {
54 if ($this->db->db_debug)
89 {
90 // Numeric field names aren't allowed in databases, so if the key is
91 // numeric, we know it was assigned by PHP and the developer manually
92 // entered the field information, so we'll simply add it to the list
93 if (is_numeric($field))
school.php (https://gitlab.com/exabyte-lab/tiffinbox) PHP · 275 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 class School extends CI_Controller {
87 if($this->db->affected_rows()):
88 $dir ='./media/schools/'.$schoolLogo;
89 @unlink($dir);
90 //remove original file:
91 $dir ='./media/schools/'.str_replace("_thumb","",$schoolLogo);
92 @unlink($dir);
93 $this->session->set_flashdata('status_right', 'Successfully deleted school information!');
94 redirect('school/index');
pgt-file.php (https://github.com/ianbogda/FileZ.git) PHP · 249 lines
1 <?php
3 /**
4 * @file CAS/PGTStorage/pgt-file.php
5 * Basic class for PGT file storage
6 */
107 function PGTStorageFile($cas_parent,$format,$path)
108 {
109 phpCAS::traceBegin();
110 // call the ancestor's constructor
111 $this->PGTStorage($cas_parent);
119 if (!preg_match('`^[a-zA-Z]:`', $path)) {
120 phpCAS::error('an absolute path is needed for PGT storage to file');
121 }
8-1.c (https://github.com/barajas/Intel-GLTP.git) C · 237 lines
File.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 219 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) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
128 $this->clear($dir . DS . $file);
129 } else {
130 @unlink($fullPath);
131 }
132 }
FilesTest.php (https://github.com/crashd0wn/fx-viper.git) PHP · 192 lines
1 <?php
2 namespace TYPO3\FLOW3\Tests\Unit\Utility;
184 $linkPathAndFilename = \TYPO3\FLOW3\Utility\Files::concatenatePaths(array(sys_get_temp_dir(), 'FLOW3FilesTestLink'));
185 if (file_exists($linkPathAndFilename)) {
186 unlink($linkPathAndFilename);
187 }
188 symlink($targetPathAndFilename, $linkPathAndFilename);
LocaleExportTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 191 lines
1 <?php
3 namespace Drupal\Tests\locale\Functional;
62 'files[file]' => $name,
63 ], 'Import');
64 $file_system->unlink($name);
66 // Get the French translations.
82 'customized' => 1,
83 ], 'Import');
84 $file_system->unlink($name);
86 // Create string without translation in the locales_source table.
file_class.php (https://github.com/musicpop/cms.git) PHP · 247 lines
1 <?php if(!defined('DEDEINC')) exit('dedecms');
2 /**
3 * Îļþ¹ÜÀíÂß¼Àà
4 *
5 * @version $Id: file_class.php 1 19:09 2010��7��12��Z tianya $
6 * @package DedeCMS.Administrator
7 * @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
35 rename($oldname,$newname);
36 }
37 ShowMsg("�ɹ�����һ���ļ�����","file_manage_main.php?activepath=".$this->activeDir);
38 return 0;
39 }
48 MkdirAll($dirname,$GLOBALS['cfg_dir_purview']);
49 CloseFtp();
50 ShowMsg("�ɹ�����һ����Ŀ¼��","file_manage_main.php?activepath=".$this->activeDir."/".$newdir);
51 return 1;
52 }
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 }
archive.php (https://github.com/mathc/joomla-cms.git) PHP · 192 lines
Bzip2.php (https://github.com/livinglab/openlab.git) PHP · 147 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
5 * Compress a single file to Bzip2 format
6 *
7 * PHP versions 4 and 5
8 *
9 * This library is free software; you can redistribute it and/or
23 * @category File Formats
24 * @package File_Archive
25 * @author Vincent Lascaux <vincentlascaux@php.net>
26 * @copyright 1997-2005 The PHP Group
27 * @license http://www.gnu.org/copyleft/lesser.html LGPL
28 * @version CVS: $Id$
29 * @link http://pear.php.net/package/File_Archive
30 */
mdnews.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 217 lines
1 <?php
2 class MdNews extends CI_Model{
3 var $obj;
71 function Delete_News($id, $type, $url_dir='public/uploads/news/'){
72 $data=$this->GetNews($id, $type);
73 unlink($url_dir.$data['image']);
74 $this->db->where(array('id'=>$id, 'type'=>$type));
75 $this->db->delete('news');
97 if($image!=''){
98 $data=$this->GetNews($id, $type);
99 unlink($url_dir.$data['image']);
100 $this->load->library('my_img');
101 $data=$this->my_img->upload($url_dir);
validator.h (https://bitbucket.org/lordgnu/wxphp.git) C Header · 214 lines
62 PHP_ME(php_wxEvtHandler, GetPreviousHandler, NULL, ZEND_ACC_PUBLIC)
63 PHP_ME(php_wxEvtHandler, IsUnlinked, NULL, ZEND_ACC_PUBLIC)
64 PHP_ME(php_wxEvtHandler, ProcessEvent, NULL, ZEND_ACC_PUBLIC)
67 PHP_ME(php_wxEvtHandler, QueueEvent, NULL, ZEND_ACC_PUBLIC)
68 PHP_ME(php_wxEvtHandler, RemoveFilter, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
69 PHP_ME(php_wxEvtHandler, SafelyProcessEvent, NULL, ZEND_ACC_PUBLIC)
72 PHP_ME(php_wxEvtHandler, SetPreviousHandler, NULL, ZEND_ACC_PUBLIC)
73 PHP_ME(php_wxEvtHandler, Unlink, NULL, ZEND_ACC_PUBLIC)
74 PHP_ME(php_wxValidator, Validate, NULL, ZEND_ACC_PUBLIC)
121 PHP_ME(php_wxEvtHandler, GetPreviousHandler, NULL, ZEND_ACC_PUBLIC)
122 PHP_ME(php_wxEvtHandler, IsUnlinked, NULL, ZEND_ACC_PUBLIC)
123 PHP_ME(php_wxEvtHandler, ProcessEvent, NULL, ZEND_ACC_PUBLIC)
131 PHP_ME(php_wxEvtHandler, SetPreviousHandler, NULL, ZEND_ACC_PUBLIC)
132 PHP_ME(php_wxEvtHandler, Unlink, NULL, ZEND_ACC_PUBLIC)
133 PHP_ME(php_wxValidator, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
file_helper.php (https://github.com/usagi-project/mynets1.git) PHP · 192 lines
cache.php (https://github.com/severnaya99/Sg-2010.git) PHP · 206 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: cache.php 801 2004-12-13 23:50:33Z wilt $
21 //
90 switch (SQL_CACHE_METHOD) {
91 case 'file':
92 @unlink(DIR_FS_SQL_CACHE . '/' . $zp_cache_name . '.sql');
93 return true;
94 break;
Libupload.php (https://github.com/rat4m3n/pyrocms-shop.git) PHP · 256 lines
lang-fr.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 73 lines
1 <?php
2 /***********************************************************************
3 ** Title.........: Insert File Dialog, File Manager
4 ** Version.......: 1.1
5 ** Author........: Al Rashid <alrashid@klokan.sk>
6 ** Filename......: lang-en.php (english language file)
7 ** URL...........: http://alrashid.klokan.sk/insFile/
8 ** Last changed..: 8 Jun 2004
14 $MY_MESSAGES['nopermtodelete'] = 'Vous n\\\'avez pas le droit de supprimer de fichier.';
15 $MY_MESSAGES['filenotfound'] = 'Fichier non trouvé.';
16 $MY_MESSAGES['unlinkfailed'] = 'La suppression a �chou�.';
17 $MY_MESSAGES['rmdirfailed'] = 'La suppression du dossier a échouée.';
18 $MY_MESSAGES['foldernotfound'] = 'Répertoire non trouvé.';
messages.php (https://github.com/libersoft/fengoffice-ls.git) PHP · 625 lines
1 <?php return array(
2 'no mail accounts set' => 'Il n\'existe aucun compte de messagerie pour envoyer ce message, veuillez d\'abord en ajouter un.',
3 'no mail accounts set for check' => 'Vous ne disposez pas de compte de messagerie pour envoyer ce message, veuillez d\'abord en créer un.',
140 'success delete file revision' => 'La révision du fichier a été supprimée.',
141 'success link objects' => '{0} objet(s) liés.',
142 'success unlink object' => 'Les objet sont maintenant détachés.',
143 'success update config category' => '{0} : la configuration a été modifiée.',
144 'success forgot password' => 'Un nouveau mot-de-passe a été envoyé à votre adresse de messagerie.',
226 'error delete task' => 'La suppression de la tâche sélectionnée a échoué.',
227 'error check for upgrade' => 'La création d\'une nouvelle révision a échoué.',
228 'error unlink object' => 'La dissociation d\'objet(s) a échoué.',
229 'error link objects max controls' => 'Ajout de liens impossible : la limite est de {0}.',
230 'error test mail settings' => 'L\'envoi du message de test a échoué.',
262 'confirm logout' => 'Êtes-vous sûr de vouloir quitter ?',
263 'confirm delete current avatar' => 'Êtes-vous sûr de vouloir supprimer cet avatar ?',
264 'confirm unlink object' => 'Êtes-vous sûr de vouloir détacher cet objet ?',
265 'confirm delete company logo' => 'Êtes-vous sûr de vouloir supprimer ce logo ?',
266 'confirm subscribe' => 'Êtes-vous sûr de vouloir vous abonner à cet objet ? Vous recevrez un message chaque fois que quelqu\'un postera un commentaire sur cet objet.',
fcntl.h (https://gitlab.com/arunc/proact-processor) C Header · 205 lines
vfsStreamWrapperFileTestCase.php (https://bitbucket.org/rafaelcaribe/seresta.git) PHP · 472 lines
1 <?php
2 /**
3 * This file is part of vfsStream.
9 */
10 namespace org\bovigo\vfs;
11 require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
12 /**
13 * Test for org\bovigo\vfs\vfsStreamWrapper.
312 vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
313 vfsStream::newFile('new.txt', 0000)->at(vfsStreamWrapper::getRoot());
314 $this->assertFalse(unlink(vfsStream::url('root/new.txt')));
315 $this->assertTrue(file_exists(vfsStream::url('root/new.txt')));
316 }
326 vfsStreamWrapper::setRoot(new vfsStreamDirectory('root', 0000));
327 vfsStream::newFile('new.txt')->at(vfsStreamWrapper::getRoot());
328 $this->assertFalse(unlink(vfsStream::url('root/new.txt')));
329 $this->assertTrue(file_exists(vfsStream::url('root/new.txt')));
330 }
upload.php (https://gitlab.com/jslee1/PrestaShop) PHP · 145 lines
1 <?php
2 include('config/config.php');
4 die('forbiden');
5 }
6 include('include/utils.php');
8 $_POST['path'] = $current_path.str_replace('\0', '', $_POST['path']);
30 $cycle = false;
31 }
32 if (file_exists($path.'config.php')) {
33 require_once($path.'config.php');
116 if ($memory_error) {
117 //error
118 unlink($targetFile);
119 header('HTTP/1.1 406 Not enought Memory', true, 406);
120 exit();
doulCi.iDeviceCheck.php (https://github.com/JesPratt/Doulci.git) PHP · 231 lines
1 <?php
3 // Checking Activation State & Grab the Tickets.
206 if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" ) )
207 {
208 @unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "ActivationTicket.data" );
209 }
210 if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" ) )
211 {
212 @unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "SoftActivationTicket.data" );
213 }
214 if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "iCloud_Locked.data" ) )
215 {
216 @unlink ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "iCloud_Locked.data" );
217 }
218 if ( @Check_File ( $Request_Path . DS . $ProductType . "_" . $BuildVersion . "_" . "Unknown_Activation_Status.data" ) )
UploadedFileTest.php (https://gitlab.com/ealexis.t/trends) PHP · 280 lines
1 <?php
2 namespace GuzzleHttp\Tests\Psr7;
9 * @covers GuzzleHttp\Psr7\UploadedFile
10 */
11 class UploadedFileTest extends \PHPUnit_Framework_TestCase
12 {
13 protected $cleanup;
22 foreach ($this->cleanup as $file) {
23 if (is_scalar($file) && file_exists($file)) {
24 unlink($file);
25 }
26 }
67 $this->setExpectedException('InvalidArgumentException', 'size');
69 new UploadedFile(fopen('php://temp', 'wb+'), $size, UPLOAD_ERR_OK);
70 }
dhd_proto.h (https://gitlab.com/minsuu/osproj3) C Header · 115 lines
10 * agreement governing use of this software, this software is licensed to you
11 * under the terms of the GNU General Public License version 2 (the "GPL"),
12 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
13 * following added to such license:
14 *
49 extern int dhd_prot_attach(dhd_pub_t *dhdp);
51 /* Unlink, frees allocated protocol memory (including dhd_prot) */
52 extern void dhd_prot_detach(dhd_pub_t *dhdp);
table.abstract.php (https://github.com/dmi3yy/modx.evo.custom.git) PHP · 304 lines
1 <?php namespace SimpleTab;
3 require_once(MODX_BASE_PATH . 'assets/lib/MODxAPI/autoTable.abstract.php');
4 require_once(MODX_BASE_PATH . 'assets/lib/Helpers/FS.php');
5 require_once(MODX_BASE_PATH . 'assets/lib/Helpers/PHPThumb.php');
7 /**
120 }
121 if ($this->fs->checkFile($url)) {
122 unlink(MODX_BASE_PATH . $url);
123 }
124 $dir = $this->fs->takeFileDir($url);
270 return false;
271 }
272 $thumb = new \Helpers\PHPThumb();
273 $inputFile = MODX_BASE_PATH . $this->fs->relativePath($url);
274 $outputFile = MODX_BASE_PATH . $this->fs->relativePath($folder) . '/' . $this->fs->relativePath($url);
Version.php (https://github.com/ngocanh/pimcore.git) PHP · 450 lines
1436TestCase.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 132 lines
1 <?php
2 /*
3 * $Id$
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information, see
19 * <http://www.phpdoctrine.org>.
20 */
25 * @package Doctrine
26 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @category Object Relational Mapping
29 * @link www.phpdoctrine.org
123 }
125 public function testSynchronizeMNRecordsDontDeleteAfterUnlink()
126 {
127 $group = Doctrine::getTable('Group')->find($this->group_one);
lex.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 960 lines
✨ Summary
This C code implements a lexical analyzer for parsing input source files. It manages multiple input sources, tracks consumed characters and tokens, and provides functions to retrieve token text, unget tokens, and set source file names. The code is part of a larger parser implementation, likely for a programming language. It ensures accurate tracking of input data and tokenization.
This C code implements a lexical analyzer for parsing input source files. It manages multiple input sources, tracks consumed characters and tokens, and provides functions to retrieve token text, unget tokens, and set source file names. The code is part of a larger parser implementation, likely for a programming language. It ensures accurate tracking of input data and tokenization.
ccache.c
(https://swig.svn.sourceforge.net/svnroot/swig)
C · 1389 lines
✨ Summary
This C code implements a caching system for compilers and other build tools. It allows users to specify a directory where cached results can be stored, and provides options for managing cache limits, clearing caches, and setting verbosity levels. The program also handles errors and networking issues, such as duping stderr to prevent caching of error messages.
This C code implements a caching system for compilers and other build tools. It allows users to specify a directory where cached results can be stored, and provides options for managing cache limits, clearing caches, and setting verbosity levels. The program also handles errors and networking issues, such as duping stderr to prevent caching of error messages.
107 if (i_tmpfile) {
108 if (!direct_i_file) {
109 unlink(i_tmpfile);
110 }
111 free(i_tmpfile);
115 /* delete the cpp stderr file if necessary */
116 if (cpp_stderr) {
117 unlink(cpp_stderr);
118 free(cpp_stderr);
119 cpp_stderr = NULL;
209 stats_update(STATS_ERROR);
210 if (tmp_outfiles) {
211 unlink(tmp_outfiles);
212 }
213 failed();
af_iucv.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1786 lines
✨ Summary
This C code implements a network protocol family for IBM’s IUCV (Inter-System Communication Vehicle) sockets, which are used to communicate between z/VM and other systems. It provides socket operations, including creation, binding, connection, listening, accepting, sending, receiving, and shutting down. The code is part of the Linux kernel and is designed to work with z/VM operating system.
This C code implements a network protocol family for IBM’s IUCV (Inter-System Communication Vehicle) sockets, which are used to communicate between z/VM and other systems. It provides socket operations, including creation, binding, connection, listening, accepting, sending, receiving, and shutting down. The code is part of the Linux kernel and is designed to work with z/VM operating system.
initramfs.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 609 lines
✨ Summary
This C code is part of a Linux kernel module that initializes and populates the root file system during boot-up. It decompresses an internal initramfs image, which contains the root file system, and unpacks its contents into the root directory. If the initramfs image is not valid, it falls back to using the internal initramfs as the root file system. The code also handles cases where the initrd region overlaps with crashkernel reserved regions.
This C code is part of a Linux kernel module that initializes and populates the root file system during boot-up. It decompresses an internal initramfs image, which contains the root file system, and unpacks its contents into the root directory. If the initramfs image is not valid, it falls back to using the internal initramfs as the root file system. The code also handles cases where the initrd region overlaps with crashkernel reserved regions.
xfs_qm.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 189 lines
✨ Summary
This C++ header file defines a set of functions and data structures for managing disk quotas on a Linux system. It provides an interface for checking quota usage, setting limits, and controlling quota operations. The code is designed to be used by the Linux kernel’s quota subsystem, allowing it to interact with user-space applications that manage disk space.
This C++ header file defines a set of functions and data structures for managing disk quotas on a Linux system. It provides an interface for checking quota usage, setting limits, and controlling quota operations. The code is designed to be used by the Linux kernel’s quota subsystem, allowing it to interact with user-space applications that manage disk space.
xfs_ag.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C Header · 254 lines
✨ Summary
This C header file defines a set of data structures and constants for the XFS (extensible filesystem) implementation. It provides definitions for various components, such as allocation groups, inode radix trees, and file system blocks, which are used to manage the filesystem’s metadata and data storage. The code is part of the Linux kernel’s XFS module.
This C header file defines a set of data structures and constants for the XFS (extensible filesystem) implementation. It provides definitions for various components, such as allocation groups, inode radix trees, and file system blocks, which are used to manage the filesystem’s metadata and data storage. The code is part of the Linux kernel’s XFS module.
97 /*
98 * Size of the unlinked inode hash table in the agi.
99 */
100 #define XFS_AGI_UNLINKED_BUCKETS 64
120 __be32 agi_dirino; /* last directory inode chunk */
121 /*
122 * Hash table of inodes which have been unlinked but are
123 * still being referenced.
124 */
125 __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS];
126 } xfs_agi_t;
Fetch.pm (git://pkgs.fedoraproject.org/perl-ModelSim-List) Perl · 94 lines
posixemulation.py
(git://github.com/mitsuhiko/werkzeug.git)
Python · 107 lines
✨ Summary
This Python code provides a POSIX emulation for renaming files on Windows systems, allowing for atomic and pseudo-atomic renames. It uses ctypes to interact with Windows API functions and handles cases where the target file already exists. The rename function falls back to traditional OS.rename if atomic rename fails.
This Python code provides a POSIX emulation for renaming files on Windows systems, allowing for atomic and pseudo-atomic renames. It uses ctypes to interact with Windows API functions and handles cases where the target file already exists. The rename function falls back to traditional OS.rename if atomic rename fails.