100+ results for 'php filesize'

Not the results you expected?

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.

FileField.php (https://github.com/silverstripe-scienceninjas/sapphire.git) PHP · 208 lines

1 <?php

2 /**

3 * Represents a file type which can be added to a form.

6 *

7 * Please set a validator on the form-object to get feedback

8 * about imposed filesize/extension restrictions.

9 *

10 * See {@link UploadField} For a more full-featured field

45

46 /**

47 * Restrict filesize for either all filetypes

48 * or a specific extension, with extension-name

49 * as array-key and the size-restriction in bytes as array-value.

112 public function Field($properties = array()) {

113 $properties = array_merge($properties, array(

114 'MaxFileSize' => $this->getValidator()->getAllowedMaxFileSize()

115 ));

116

OAuth.php (https://gitlab.com/wuhang2003/core) PHP · 216 lines

1 <?php

2

3 /**

7 * @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.

8 * @author Evert Pot (http://www.rooftopsolutions.nl/)

9 * @license http://code.google.com/p/dropbox-php/wiki/License MIT

10 */

11

81 * @var resource | string

82 */

83 protected $inFileSize = null;

84

85 /**

162 $this->inFileSize = $stat['size'];

163 } else if (is_string($file) && is_readable($file)) {

164 $this->inFileSize = filesize($file);

165 $file = fopen($file, 'rb');

166 }

CompilationSection.cs (https://github.com/t-ashula/mono.git) C# · 254 lines

46 static ConfigurationProperty batchTimeoutProp;

47 static ConfigurationProperty maxBatchSizeProp;

48 static ConfigurationProperty maxBatchGeneratedFileSizeProp;

49 static ConfigurationProperty numRecompilesBeforeAppRestartProp;

50 static ConfigurationProperty defaultLanguageProp;

85 explicitProp = new ConfigurationProperty ("explicit", typeof (bool), true);

86 maxBatchSizeProp = new ConfigurationProperty ("maxBatchSize", typeof (int), 1000);

87 maxBatchGeneratedFileSizeProp = new ConfigurationProperty ("maxBatchGeneratedFileSize", typeof (int), 3000);

88 numRecompilesBeforeAppRestartProp = new ConfigurationProperty ("numRecompilesBeforeAppRestart", typeof (int), 15);

89 strictProp = new ConfigurationProperty ("strict", typeof (bool), false);

112 properties.Add (explicitProp);

113 properties.Add (maxBatchSizeProp);

114 properties.Add (maxBatchGeneratedFileSizeProp);

115 properties.Add (numRecompilesBeforeAppRestartProp);

116 properties.Add (strictProp);

DataTest.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 134 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

23 * @subpackage integration_tests

24 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

25 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

26 */

27

28 class Mage_Sitemap_Helper_DataTest extends PHPUnit_Framework_TestCase

29 {

30 /**

file_details.php (https://github.com/cj/Project-Pier.git) PHP · 107 lines

31 <?php if ($file->isPrivate()) { ?>

32 <div class="private" title="<?php echo lang('private file') ?>"><span><?php echo lang('private file') ?></span></div>

33 <?php } // if ?>

41 <?php if ($folder instanceof ProjectFolder) { ?>

42 <div id="fileFolder"><span class="propertyName"><?php echo lang('folder') ?>:</span> <a href="<?php echo $folder->getBrowseUrl() ?>"><?php echo clean($folder->getName()) ?></a></div>

43 <?php } // if ?>

75 <?php $counter++; ?>

76 <div class="revision <?php echo $counter % 2 ? 'even' : 'odd' ?> <?php echo $counter == 1 ? 'lastRevision' : '' ?>" id="revision<?php echo $revision->getId() ?>">

77 <div class="revisionName">

78 <?php if ($revision->getCreatedBy() instanceof User) { ?>

88 $options = array();

89 if ($revision->canDownload(logged_user())) {

90 $options[] = '<a href="' . $revision->getDownloadUrl() . '" class="downloadLink">' . lang('download') . ' <span>(' . format_filesize($revision->getFileSize()) . ')</span></a>';

91 }

92 if ($revision->canEdit(logged_user())) {

mail.php (https://gitlab.com/2202Programming/navxmxp) PHP · 406 lines

1 <?php

2 class Mail {

3 protected $to;

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98

126 $handle = fopen($attachment, 'r');

127

128 $content = fread($handle, filesize($attachment));

129

130 fclose($handle);

157 exit();

158 } else {

159 if (substr(PHP_OS, 0, 3) != 'WIN') {

160 socket_set_timeout($handle, $this->timeout, 0);

161 }

FilesystemTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 240 lines

1 <?php

2

3 /*

119 * @group GH-1339

120 */

121 public function testRemoveDirectoryPhp()

122 {

123 $tmp = sys_get_temp_dir();

126

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 }

131

132 public function testFileSize()

133 {

134 $tmp = sys_get_temp_dir();

Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines

1 <?php namespace Illuminate\Filesystem;

2

3 use ErrorException;

206 public function size($path)

207 {

208 return filesize($path);

209 }

210

mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines

1 <?php

2 class Mail {

3 protected $to;

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

126 $handle = fopen($attachment, 'r');

127

128 $content = fread($handle, filesize($attachment));

129

130 fclose($handle);

157 exit();

158 } else {

159 if (substr(PHP_OS, 0, 3) != 'WIN') {

160 socket_set_timeout($handle, $this->timeout, 0);

161 }

FileValidatorTest.php (https://github.com/Exercise/symfony.git) PHP · 324 lines

1 <?php

2

3 /*

17 use Symfony\Component\HttpFoundation\File\UploadedFile;

18

19 abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase

20 {

21 protected $context;

315

316 if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) {

317 $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array('{{ limit }}' => UploadedFile::getMaxFilesize() . ' bytes'));

318 }

319

example09_forms.php (https://gitlab.com/varsha_evonix/intranet) PHP · 204 lines

1 <?php

2

3

5

6 define('_MPDF_PATH','../');

7 include("../mpdf.php");

8

9

179 $file = __FILE__;

180 header("Content-Type: text/plain");

181 header("Content-Length: ". filesize($file));

182 header("Content-Disposition: attachment; filename='".$file."'");

183 readfile($file);

Image.php (https://gitlab.com/geeta7/drupal) PHP · 227 lines

1 <?php

2

3 /**

39 * @var int

40 */

41 protected $fileSize;

42

43 /**

57 // Defer image file validity check to the toolkit.

58 if ($this->getToolkit()->parseFile()) {

59 $this->fileSize = filesize($this->source);

60 }

61 }

131 // Clear the cached file size and refresh the image information.

132 clearstatcache(TRUE, $destination);

133 $this->fileSize = filesize($destination);

134 $this->source = $destination;

135

WebPlatformStrategies.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 159 lines

137 virtual WTF::String crashedPluginText();

138 virtual WTF::String multipleFileUploadText(unsigned numberOfFiles);

139 virtual WTF::String unknownFileSizeText();

140 virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize&);

141 virtual WTF::String mediaElementLoadingStateText();

index.php (https://github.com/geekbuntu/php-formation.git) PHP · 168 lines

67 'file1' => array(

68 'isFile' => 'File 1 is required',

69 'maxFilesize' => 'Filesize is too large'

70 ),

71 'file2' => array(

115 <?php echo $form->text('email'); ?></p>

116

117 <p><?php echo $form->label('website', 'Website: Optional'); ?><br>

118 <?php echo $form->text('website'); ?></p>

121 <?php echo $form->password('password'); ?></p>

122

123 <p><?php echo $form->label('decimal', 'Decimal: Optional, 2 points'); ?><br>

124 <?php echo $form->text('decimal'); ?></p>

127 <?php echo $form->text('date'); ?></p>

128

129 <p><?php echo $form->label('file1', 'File 1: Required, Filesize 5MB'); ?><br>

130 <?php echo $form->file('file1'); ?></p>

Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines

1 <?php

2 /**

3 * Directory Gadget

106 $data['user_filename'] = $files['file'][0]['user_filename'];

107 $data['mime_type'] = $files['file'][0]['host_mimetype'];

108 $data['file_size'] = $files['file'][0]['host_filesize'];

109 } elseif (isset($data['host_filename'])) {

110 if ($data['host_filename'] == ':nochange:') {

Ftp.php (https://gitlab.com/endomorphosis/jeffersonsmithmayor) PHP · 373 lines

1 <?php

2

3 /**

10 define('W3TC_CDN_FTP_CONNECT_TIMEOUT', 30);

11

12 require_once W3TC_LIB_W3_DIR . '/Cdn/Base.php';

13

14 /**

24

25 /**

26 * PHP5 Constructor

27 *

28 * @param array $config

43

44 /**

45 * PHP4 Constructor

46 *

47 * @param array $config

dmFormEmbedMediaTest.php (https://github.com/fospald/diem.git) PHP · 275 lines

72 $media1 = $post->Image;

73 $t->is($media1->file, $media1FileName, 'Post media filename is '.$media1FileName);

74 $t->is($media1->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));

75

76 $t->comment('Resave the post without uploading media');

100

101 $t->is($post->Image->file, $media1FileName, 'Post media filename is '.$media1FileName);

102 $t->is($post->Image->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));

103

104 $t->comment('Remove the media from the post');

165

166 $t->is($post->Image->file, $expected = str_replace('.jpg', '_1.jpg', $media1FileName), 'Post media filename is '.$expected);

167 $t->is($post->Image->size, filesize($media1FullPath), 'Post media size is '.filesize($media1FullPath));

168

169 $t->ok($media1->exists(), 'media1 still exists');

migration52.global-constants.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 315 lines

9 <div class="prev" style="text-align: left; float: left;"><a href="migration52.classes.html">新しいクラス</a></div>

10 <div class="next" style="text-align: right; float: right;"><a href="migration52.class-constants.html">新しいクラス定数</a></div>

11 <div class="up"><a href="migration52.html">PHP 5.1.x から PHP 5.2.x への移行</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

14 <h2 class="title">新しいグローバル定数</h2>

15

16 <p class="para">PHP コア:</p>

17 <ul class="itemizedlist">

18 <li class="listitem">

92 <li class="listitem">

93 <span class="simpara">

94 <b><tt>CURLE_FILESIZE_EXCEEDED</tt></b>

95 </span>

96 </li>

311 <div class="prev" style="text-align: left; float: left;"><a href="migration52.classes.html">新しいクラス</a></div>

312 <div class="next" style="text-align: right; float: right;"><a href="migration52.class-constants.html">新しいクラス定数</a></div>

313 <div class="up"><a href="migration52.html">PHP 5.1.x から PHP 5.2.x への移行</a></div>

314 <div class="home"><a href="index.html">PHP Manual</a></div>

Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines

1 <?php

2 namespace W3TC;

3

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 );

315

316 $path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );

317

318 return $path;

346 $size = $this->dirsize( $full_path, $size, $timeout_time );

347 } else {

348 $size['bytes'] += @filesize( $full_path );

349

350 // dont check time() for each file, quite expensive

tool-file-editor.php (https://gitlab.com/hop23typhu/list-theme) PHP · 134 lines

1 <?php

2 /**

3 * @package WPSEO\Admin

68 }

69

70 $action_url = network_admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); // auto-falls back on admin_url for non-multisite

71

72 echo '<h2>', __( 'Robots.txt', 'wordpress-seo' ), '</h2>';

88

89 $content = '';

90 if ( filesize( $robots_file ) > 0 ) {

91 $content = fread( $f, filesize( $robots_file ) );

112

113 $contentht = '';

114 if ( filesize( $ht_access_file ) > 0 ) {

115 $contentht = fread( $f, filesize( $ht_access_file ) );

plugin.php (https://github.com/JamieLomas/pyrocms.git) PHP · 300 lines

1 <?php defined('BASEPATH') OR exit('No direct script access allowed');

2 /**

3 * Files Plugin

46 * {width}

47 * {height}

48 * {filesize}

49 * {date_added}

50 *

298 }

299

300 /* End of file plugin.php */

format.php (https://bitbucket.org/ciceidev/cicei_moodle_conditional_activities.git) PHP · 432 lines

9 ////////////////////////////////////////////////////////////////////////////

10

11 // Based on default.php, included by ../import.php

12 /**

13 * @package questionbank

16 require_once ("$CFG->libdir/xmlize.php");

17 require_once ("$CFG->libdir/tcpdf/html_entity_decode_php4.php");

18

19 class qformat_blackboard extends qformat_default {

38 if (zip_entry_open($zip, $zip_entry, "r")) {

39

40 $strbuf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));

41 $buf = explode("\n", $strbuf);

42 zip_entry_close($zip_entry);

141 // put questiontext in question object

142 if ($ishtml) {

143 $question->questiontext = html_entity_decode_php4(trim($thisquestion["#"]["BODY"][0]["#"]["TEXT"][0]["#"]));

144 }

145 $question->questiontext = addslashes($question->questiontext);

DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines

1 <?php

2

3 /**

4 * File holding the DirectFilesystem class.

5 *

6 * @file DirectFilesystem.php

7 * @ingroup Deployment

8 * @ingroup Filesystem

16

17 /**

18 * Filesystem class for direct PHP file and folder manipulation.

19 *

20 * @author Jeroen De Dauw

310 public function getSize( $file ) {

311 wfSuppressWarnings();

312 $result = filesize( $file );

313 wfRestoreWarnings();

314 return $result;

FileManager.php (https://github.com/livinglab/openlab.git) PHP · 242 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

109

110 /**

111 * Gets the filesize of a path or URL.

112 *

113 * @access public

129 }

130 } else {

131 if ( file_exists( $file_path ) && ( $filesize = filesize( $file_path ) ) ) {

132 return $filesize;

147 */

148 public function json_encode_files( $files ) {

149 if ( version_compare( phpversion(), "5.4.0", ">=" ) ) {

150 $files = json_encode( $files, JSON_UNESCAPED_UNICODE );

151 } else {

SamplesTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 182 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

6 namespace Magento\Downloadable\Test\Unit\Block\Adminhtml\Catalog\Product\Edit\Tab\Downloadable;

7

8 class SamplesTest extends \PHPUnit_Framework_TestCase

9 {

10 /**

59 'getFilePath',

60 'ensureFileInFilesystem',

61 'getFileSize'

62 ],

63 [],

170 $this->fileHelper->expects($this->any())->method('ensureFileInFilesystem')

171 ->will($this->returnValue(true));

172 $this->fileHelper->expects($this->any())->method('getFileSize')

173 ->will($this->returnValue('1.1'));

174 $this->urlBuilder->expects($this->any())->method('getUrl')

FileValidator.php (https://gitlab.com/Marwamimo/Crowdrise_Web) PHP · 215 lines

1 <?php

2

3 /*

62 throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $constraint->maxSize));

63 }

64 $limitInBytes = min(UploadedFile::getMaxFilesize(), $limitInBytes);

65 } else {

66 $limitInBytes = UploadedFile::getMaxFilesize();

135

136 if ($constraint->maxSize) {

137 $sizeInBytes = filesize($path);

138 $limitInBytes = (int) $constraint->maxSize;

139

ParameterCheckingTests.cs (https://github.com/dangerwheeler/ravendb.git) C# · 1201 lines

294 {

295 JET_HANDLE handle;

296 long fileSizeLow;

297 long fileSizeHigh;

298 Api.JetOpenFileInstance(this.instance, null, out handle, out fileSizeLow, out fileSizeHigh);

299 }

300

KMediaInfoMediaParser.php (https://github.com/richhl/kalturaCE.git) PHP · 256 lines

1 <?php

2 /**

3 * @package infra

200 {

201 case "file size":

202 $mediaInfo->fileSize = $this->convertValue2kbits($this->trima($val));

203 break;

204 case "format":

files.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 306 lines

13 */

14

15 namespace phpFastCache\Drivers;

16

17 use phpFastCache\Core\DriverAbstract;

18 use phpFastCache\Exceptions\phpFastCacheDriverException;

19

20 /**

28 * phpFastCache_files constructor.

29 * @param array $config

30 * @throws phpFastCacheDriverException

31 */

32 public function __construct($config = array())

57 * @param bool $skip

58 * @return string

59 * @throws phpFastCacheDriverException

60 */

61 private function getFilePath($keyword, $skip = false)

SplFileInfo.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 444 lines

1 <?php

2

3 // This doc comment block generated by idl/sysdoc.php

4 /**

5 * ( excerpt from http://docs.hhvm.com/manual/en/class.splfileinfo.php )

6 *

7 * The SplFileInfo class offers a high-level object oriented interface to

15 private $infoClass = "SplFileInfo";

16

17 // This doc comment block generated by idl/sysdoc.php

18 /**

19 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.construct.php )

28 }

29

30 // This doc comment block generated by idl/sysdoc.php

31 /**

32 * ( excerpt from http://docs.hhvm.com/manual/en/splfileinfo.getpath.php )

ArticleFileDAO.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 398 lines

1 <?php

2

3 /**

4 * @file classes/articleArticleFileDAO.inc.php

5 *

6 * Copyright (c) 2003-2009 John Willinsky

242 $articleFile->setFileName($row['file_name']);

243 $articleFile->setFileType($row['file_type']);

244 $articleFile->setFileSize($row['file_size']);

245 $articleFile->setOriginalFileName($row['original_file_name']);

246 $articleFile->setType($row['type']);

268 $articleFile->getFileName(),

269 $articleFile->getFileType(),

270 $articleFile->getFileSize(),

271 $articleFile->getOriginalFileName(),

272 $articleFile->getType(),

FreetypeFontScaler.java (https://gitlab.com/borneywpf/openjdk-7-src) Java · 262 lines

60

61 public FreetypeFontScaler(Font2D font, int indexInCollection,

62 boolean supportsCJK, int filesize) {

63 int fonttype = TRUETYPE_FONT;

64 if (font instanceof Type1Font) {

69 indexInCollection,

70 supportsCJK,

71 filesize);

72 this.font = new WeakReference(font);

73 }

196 }

197

198 synchronized Point2D.Float getGlyphPoint(long pScalerContext,

199 int glyphCode, int ptNumber)

200 throws FontScalerException {

ImageUploadServiceTest.php (https://gitlab.com/dayitv89/laravel-tricks) PHP · 244 lines

1 <?php

2

3 namespace Tricks\Services\Upload;

150 * @group tricks/services

151 */

152 public function testGetFileSize()

153 {

154 $filesystemMock = Mockery::mock('Illuminate\Filesystem\Filesystem')

169 $this->assertEquals(

170 'mocked',

171 $imageUploadServiceMock->getFileSize('foo')

172 );

173 }

211

212 $imageUploadServiceMock

213 ->shouldReceive('getFileSize')

214 ->atLeast()->once()

215 ->with('foo')

FileModel.java (https://gitlab.com/lisit1003/TTServer) Java · 215 lines

45 */

46 public boolean saveFileRecord(int userId, int toUserId, String taskId, String filePath,

47 int fileSize) {

48 if (userId <= 0 || toUserId <= 0 || filePath == null

49 || "".equals(filePath)) {

66 statement.setInt(index++, time);

67 statement.setInt(index++, time);

68 statement.setInt(index++, fileSize);

69 statement.executeUpdate();

70 } catch (SQLException e) {

153 file.setCreated(rs.getInt("created"));

154 file.setUpdated(rs.getInt("updated"));

155 file.setFileSize(rs.getInt("fsize"));

156 fileList.add(file);

157 }

Abstract.php (https://github.com/shopaholiccompany/shopaholic.git) PHP · 225 lines

1 <?php

2 /**

3 * SocialEngine

7 * @copyright Copyright 2006-2010 Webligo Developments

8 * @license http://www.socialengine.net/license/

9 * @version $Id: Abstract.php 7244 2010-09-01 01:49:53Z john $

10 * @author John

11 */

95 'name' => basename($file),

96 'type' => 'unknown/unknown', // @todo

97 'size' => filesize($file)

98 );

99

MediaContent.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 527 lines

57 * @var int

58 */

59 protected $_fileSize = null;

60

61 /**

122 * Creates an individual MediaContent object.

123 */

124 public function __construct($url = null, $fileSize = null, $type = null,

125 $medium = null, $isDefault = null, $expression = null,

126 $bitrate = null, $framerate = null, $samplingrate = null,

131 parent::__construct();

132 $this->_url = $url;

133 $this->_fileSize = $fileSize;

134 $this->_type = $type;

135 $this->_medium = $medium;

165 if ($this->_fileSize !== null) {

166 $element->setAttribute('fileSize', $this->_fileSize);

167 }

168 if ($this->_type !== null) {

p2pAttachmentsTest5.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 353 lines

1 <?php

2

3 if ( !defined( 'MEDIAWIKI' ) ) { define( 'MEDIAWIKI', true ); }

4 require_once 'p2pBot.php';

5 require_once 'BasicBot.php';

6 include_once 'p2pAssert.php';

7 require_once '../../../includes/GlobalFunctions.php';

8 require_once '../patch/Patch.php';

9 require_once '../files/utils.php';

10 require_once 'settings.php';

11

12 $wgDebugLogGroups = array(

tableadd-v1.2.0.php (https://github.com/usagi-project/mynets1.git) PHP · 439 lines

1 <?php

2 //追加されたテーブルの一覧と、そのSQL

3 $tableaddlist = array(

172 `c_member_id` int(11) NOT NULL default '0',

173 `filename` text NOT NULL,

174 `filesize` int(11) NOT NULL default '0',

175 `filetype` char(3) NOT NULL default '',

176 `owner_id` int(11) NOT NULL default '0',

193 `c_member_id` int(11) NOT NULL default '0',

194 `filename` text NOT NULL,

195 `filesize` int(11) NOT NULL default '0',

196 `filetype` char(3) NOT NULL default '',

197 `owner_id` int(11) NOT NULL default '0',

214 `c_member_id` int(11) NOT NULL default '0',

215 `filename` text NOT NULL,

216 `filesize` int(11) NOT NULL default '0',

217 `filetype` char(3) NOT NULL default '',

218 `owner_id` int(11) NOT NULL default '0',

bspfile.c (https://github.com/atphalix/eviltoys.git) C · 363 lines

335 /*

336 =============

337 PrintBSPFileSizes

338

339 Dumps info about current file

340 =============

341 */

342 void PrintBSPFileSizes (void)

343 {

344 printf ("%5i planes %6i\n", numplanes, (int)(numplanes*sizeof(dplane_t)));

1.1.1to1.2.0Versionup.sql (https://github.com/usagi-project/mynets1.git) SQL · 341 lines

68 `c_member_id` int(11) NOT NULL default '0',

69 `filename` text NOT NULL,

70 `filesize` int(11) NOT NULL default '0',

71 `filetype` char(3) NOT NULL default '',

72 `owner_id` int(11) NOT NULL default '0',

93 `c_member_id` int(11) NOT NULL default '0',

94 `filename` text NOT NULL,

95 `filesize` int(11) NOT NULL default '0',

96 `filetype` char(3) NOT NULL default '',

97 `owner_id` int(11) NOT NULL default '0',

118 `c_member_id` int(11) NOT NULL default '0',

119 `filename` text NOT NULL,

120 `filesize` int(11) NOT NULL default '0',

121 `filetype` char(3) NOT NULL default '',

122 `owner_id` int(11) NOT NULL default '0',

plugins.php (https://github.com/sarriaroman/Cronos-Aion.git) PHP · 389 lines

1 <?php

2

3 /**

55 function create_database_schema_from_file($file) {

56 $fh = fopen($file, 'r');

57 $sql = fread($fh, filesize($file));

58 fclose($fh);

59

178 $plg = Plugin::getByPath($plugin);

179

180 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '&section=' . $section );

181 } else {

182 $permalink = getPermalink(0);

204 $plg = Plugin::getByPath($plugin);

205

206 return urlencode( base_url . 'admin.php?plugin=' . $plg->invoke_name . '&section=' . $section . "&module=" . $module );

207 } else {

208 $permalink = getPermalink(0);

%%6F^6F0^6F01080C%%vodafone.css.php (https://github.com/roycocup/Tests.git) PHP · 646 lines

1 <?php /* Smarty version 2.6.18, created on 2008-04-29 17:49:46

2 compiled from view:css/vodafone.css */ ?>

3 /* CSS Document */

4 <?php echo '

5 html

6 {

589 }

590

591 .media_filesize

592 {

593 float: right;

virtual-host.h (https://github.com/soitun/hiphop-php.git) C Header · 140 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |

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 | http://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 */

DebugDirectory.cpp (https://bitbucket.org/deeso/qfscanner.git) C++ · 383 lines

6 *

7 * This software is licensed under the zlib/libpng License.

8 * For more details see http://www.opensource.org/licenses/zlib-license.php

9 * or the license information file (license.htm) in the root directory

10 * of PeLib.

69 {

70 std::ifstream ifFile(strFilename.c_str(), std::ios::binary);

71 unsigned int ulFileSize = fileSize(ifFile);

72

73 if (!ifFile)

76 }

77

78 if (ulFileSize < uiOffset + uiSize)

79 {

80 return ERROR_INVALID_FILE;

Filesystem.php (https://gitlab.com/kimting254/wbms) PHP · 441 lines

1 <?php namespace Illuminate\Filesystem;

2

3 use ErrorException;

211 public function size($path)

212 {

213 return filesize($path);

214 }

215

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 */

10

11 require_once(str_replace('\\\\', '/', dirname(__FILE__)) . '/config.class.php');

12

13 /**

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');

487 $fn = $pgdir . "core/lib/theme/" . $this->name . "/templates/editor.tpl";

488 $handle = fopen($fn, "r");

489 $this->template = fread($handle, filesize($fn));

490 fclose($handle);

491 }

file-folder.rst (https://github.com/jamiemill/docs.git) ReStructuredText · 436 lines

9 ===========

10

11 Ensure the classes are loaded using :php:meth:`App::uses()`::

12

13 <?php

17 Then we can setup a new folder instance::

18

19 <?php

20 $dir = new Folder('/path/to/folder');

21

22 and search for all *.ctp* files within that folder using regex::

23

24 <?php

25 $files = $dir->find('.*\.ctp');

26

fileuploader.php (https://gitlab.com/pankajmohale/chef2go) PHP · 154 lines

1 <?php

2 class fileuploaderGmp {

3 private $_error = '';

51 switch($_FILES[$inputname]['error']) {

52 case '1':

53 $this->_error = 'The uploaded file exceeds the upload_max_filesize directive in php.ini';

54 break;

55 case '2':

81 }

82 if($res) {

83 //$this->_fileSize = $_FILES[$inputname]['size'];

84 $this->_dest = $destSubDir;

85 $this->_inputname = $inputname;

class-ai1wm-extractor.php (https://gitlab.com/haque.mdmanzurul/roadskill) PHP · 296 lines

1 <?php

2

3 /**

219 }

220

221 // is the filesize more than 0 bytes?

222 while ( $data['size'] > 0 ) {

223 // read the file in chunks of 512KB

extensions_themes_controller.php (https://github.com/ShadowCross/croogo.git) PHP · 195 lines

1 <?php

2 /**

3 * Extensions Themes Controller

4 *

5 * PHP version 5

6 *

7 * @category Controller

9 * @version 1.0

10 * @author Fahad Ibnay Heylaal <contact@fahad19.com>

11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

12 * @link http://www.croogo.org

13 */

80 if (strstr($zipEntryName, 'theme.yml') &&

81 zip_entry_open($zip, $zip_entry, "r")) {

82 $ymlContent = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));

83

84 $zipEntryNameE = explode('/', $zipEntryName);

KalturaStorageProfileClientPlugin.php (https://github.com/richhl/kalturaCE.git) PHP · 347 lines

1 <?php

2 require_once(dirname(__FILE__) . "/../KalturaClientBase.php");

3 require_once(dirname(__FILE__) . "/../KalturaEnums.php");

4 require_once(dirname(__FILE__) . "/../KalturaTypes.php");

150 * @var int

151 */

152 public $minFileSize = null;

153

154 /**

157 * @var int

158 */

159 public $maxFileSize = null;

160

161 /**

file.c (https://github.com/jgraef/aNXT.git) C · 313 lines

90 * @param nxt NXT handle

91 * @param file Filename

92 * @param filesize Reference for filesize

93 * @return File handle

94 * @note Use nxt_file_open

102 if (nxt_unpack_error(nxt)==0) {

103 int handle = (int)nxt_unpack_byte(nxt);

104 if (filesize!=NULL) *filesize = nxt_unpack_dword(nxt);

105 return handle;

106 }

268 * @param wildcard Wildcard to search for

269 * @param filename Reference to store filename of found file as string

270 * @param filesize Reference to store filesize of found file

271 * @return File handle of found file

272 * @note The pointer 'filename' can and should be passed to free()

Zip.php (https://gitlab.com/r.collas/site_central) PHP · 183 lines

1 <?php

2 /**

3 * Yab Framework

102 $c_len = strlen($zdata);

103 $fr .= pack('V', $crc); // crc32

104 $fr .= pack('V', $c_len); // compressed filesize

105 $fr .= pack('V', $unc_len); // uncompressed filesize

116 // problems in some cases (bug #1037737)

117 //$fr .= pack('V', $crc); // crc32

118 //$fr .= pack('V', $c_len); // compressed filesize

119 //$fr .= pack('V', $unc_len); // uncompressed filesize

130 $cdrec .= $hexdtime; // last mod time & date

131 $cdrec .= pack('V', $crc); // crc32

132 $cdrec .= pack('V', $c_len); // compressed filesize

133 $cdrec .= pack('V', $unc_len); // uncompressed filesize

commands.php (https://github.com/lxcenter/hypervm.git) PHP · 222 lines

1 <?php

2 /*

3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net

20 * == END LICENSE ==

21 *

22 * This is the File Manager Connector for PHP.

23 */

24

71 else

72 {

73 $iFileSize = filesize( $sServerDir . $sFile ) ;

74 if ( $iFileSize > 0 )

75 {

76 $iFileSize = round( $iFileSize / 1024 ) ;

77 if ( $iFileSize < 1 ) $iFileSize = 1 ;

localization.php (https://github.com/foxluck/otdelstroy.git) PHP · 202 lines

1 <?php

2 /*

3 $init_required = false;

4 require_once( "../../../common/html/includes/httpinit.php" );

5

6 require_once( WBS_DIR."/published/wbsadmin/wbsadmin.php" );

152 /*extract(wbs_getSystemStatistics());

153

154 $preproc = new php_preprocessor( $templateName, $kernelStrings, $language, "wbsadmin" );

155

156 $preproc->assign( 'systemConfiguration', $systemConfiguration );

192

193 $preproc->assign( PAGE_TITLE, sprintf('%s &mdash; %s',translate('lll_page_title'),isset($cur_lang['NAME'])?$cur_lang['NAME']:translate('lll_page_name')));

194 $preproc->assign( 'pdfGuideSize', sprintf( "%02.0fK", filesize( GUIDE_FILE )/1024 ) );

195 $preproc->assign( 'pdfAdminFile', GUIDE_FILE );

196 $preproc->assign( 'returnLink', PAGE_DB_WBSADMIN );

FileValidator.php (https://bitbucket.org/AdriVanHoudt/school.git) PHP · 158 lines

1 <?php

2

3 /*

38 switch ($value->getError()) {

39 case UPLOAD_ERR_INI_SIZE:

40 $maxSize = UploadedFile::getMaxFilesize();

41 $maxSize = $constraint->maxSize ? min($maxSize, $constraint->maxSize) : $maxSize;

42 $this->context->addViolation($constraint->uploadIniSizeErrorMessage, array(

97 if ($constraint->maxSize) {

98 if (ctype_digit((string) $constraint->maxSize)) {

99 $size = filesize($path);

100 $limit = $constraint->maxSize;

101 $suffix = 'bytes';

102 } elseif (preg_match('/^(\d+)k$/', $constraint->maxSize, $matches)) {

103 $size = round(filesize($path) / 1000, 2);

104 $limit = $matches[1];

105 $suffix = 'kB';

FileSource.php (https://gitlab.com/ElvisAns/tiki) PHP · 151 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

65 'filename' => $typeFactory->identifier($file['filename']),

66 'filetype' => $typeFactory->sortable(preg_replace('/^([\w-]+)\/([\w-]+).*$/', '$1/$2', $file['filetype'])),

67 'filesize' => $typeFactory->plaintext($file['filesize']),

68 'hits' => $typeFactory->numeric($file['hits']),

69

112 'filename',

113 'filetype',

114 'filesize',

115 'hits',

116

MediaContent.php (https://github.com/kiranatama/sagalaya.git) PHP · 517 lines

1 <?php

2 /**

3 * Zend Framework

47 * @var int

48 */

49 protected $_fileSize = null;

50

51 /**

121 parent::__construct();

122 $this->_url = $url;

123 $this->_fileSize = $fileSize;

124 $this->_type = $type;

125 $this->_medium = $medium;

155 if ($this->_fileSize !== null) {

156 $element->setAttribute('fileSize', $this->_fileSize);

157 }

158 if ($this->_type !== null) {

Process.php (https://gitlab.com/yasminmostfa/thomas-site) PHP · 257 lines

1 <?php

2 /**

3 * Piwik - free/libre analytics platform

105 }

106

107 if (!$this->pidFileSizeIsNormal()) {

108 $this->finishProcess();

109 return false;

121 }

122

123 private function pidFileSizeIsNormal()

124 {

125 $size = Filesystem::getFileSize($this->pidFile);

194

195 if (empty($uname)) {

196 $uname = php_uname();

197 }

198

extension.cache.mysql.php (https://gitlab.com/x33n/ampache) PHP · 190 lines

85 // Check for mysql support

86 if (!function_exists('mysql_pconnect')) {

87 throw new Exception('PHP not compiled with mysql support.');

88 }

89

141 // Short-hands

142 $filetime = filemtime($filename);

143 $filesize = filesize($filename);

144

145 // Lookup file

147 $SQLquery .= ' FROM `'.mysql_real_escape_string($this->table).'`';

148 $SQLquery .= ' WHERE (`filename` = \''.mysql_real_escape_string($filename).'\')';

149 $SQLquery .= ' AND (`filesize` = \''.mysql_real_escape_string($filesize).'\')';

150 $SQLquery .= ' AND (`filetime` = \''.mysql_real_escape_string($filetime).'\')';

151 $this->cursor = mysql_query($SQLquery, $this->connection);

ftp.php (https://gitlab.com/wendy-du-973/club-invest-gr2) PHP · 496 lines

1 <?php

2

3 namespace Safe;

10 *

11 * @param resource $ftp_stream The link identifier of the FTP connection.

12 * @param int $filesize The number of bytes to allocate.

13 * @param string $result A textual representation of the servers response will be returned by

14 * reference in result if a variable is provided.

16 *

17 */

18 function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void

19 {

20 error_clear_last();

21 $result = \ftp_alloc($ftp_stream, $filesize, $result);

22 if ($result === false) {

23 throw FtpException::createFromPhpError();

Pak.cpp (https://bitbucket.org/veltarn/nectar-editor.git) C++ · 306 lines

235 }

236

237 long int PAK::getFileSize(std::string filename)

238 {

239 for(unsigned int i = 0; i < m_entries.size(); i++)

MediaMimeStream.php (https://github.com/leerbag/zf2.git) PHP · 185 lines

1 <?php

2

3 /**

100 $this->_parts = array($entry, $file, $closingBoundary);

101

102 $fileSize = filesize($filePath);

103 $this->_totalSize = $entry->getSize() + $fileSize

file.php (https://github.com/enygma/fuel.git) PHP · 274 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 Dan Horrigan

12 * @link http://fuelphp.com

13 */

14

250

251 // read the session data

252 $payload = fread($handle, filesize($file));

253

254 //release the lock

Hdcp.cpp (https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk) C++ · 344 lines

147 {

148 FILE *fd = NULL;

149 int invalid_key_size, filesize;

150 int temp, vrl_length, i;

151 unsigned char data, generation;

158

159 fseek(fd, 0, SEEK_END);

160 filesize = ftell(fd);

161 ALOGD("[%s] SRM file size is %d", __FUNCTION__, filesize);

162 fseek(fd, 0, SEEK_SET);

163 *buf = (char*) malloc(filesize);

164 if(*buf == NULL) {

165 ALOGE("[%s] no enough memory to malloc srm data.\n", __FUNCTION__);

166 goto failed;

167 }

168 memset(*buf, 0, filesize);

169

170 temp = 0;

Upload.php (https://github.com/rduenasf/ucursos-scrapper.git) PHP · 216 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Validate_Abstract

24 */

25 require_once 'Zend/Validate/Abstract.php';

26

27 /**

109

110 if (count($return) === 0) {

111 require_once 'Zend/Validate/Exception.php';

112 throw new Zend_Validate_Exception("The file '$file' was not found");

113 }

120

121 /**

122 * Sets the minimum filesize

123 *

124 * @param array $files The files to check in syntax of Zend_File_Transfer

Stream.php (https://bitbucket.org/dgavey/rps-hack.git) PHP · 272 lines

1 <?php

2

3 namespace Guzzle\Common;

6

7 /**

8 * PHP stream implementation

9 */

10 class Stream implements StreamInterface

152 }

153

154 // If the stream is a file based stream and local, then check the filesize

155 if ($this->isLocal() && $this->getWrapper() == 'plainfile' && $this->getUri() && file_exists($this->getUri())) {

156 return filesize($this->getUri());

format.php (https://github.com/bobpuffer/1.9.12-LAE1.3.git) PHP · 432 lines

1 <?php // $Id: format.php 68 2009-07-31 18:23:01Z dlandau $

2

3 ////////////////////////////////////////////////////////////////////////////

9 ////////////////////////////////////////////////////////////////////////////

10

11 // Based on default.php, included by ../import.php

12 /**

13 * @package questionbank

16 require_once ("$CFG->libdir/xmlize.php");

17 require_once ("$CFG->libdir/tcpdf/html_entity_decode_php4.php");

18

19 class qformat_blackboard extends qformat_default {

141 // put questiontext in question object

142 if ($ishtml) {

143 $question->questiontext = html_entity_decode_php4(trim($thisquestion["#"]["BODY"][0]["#"]["TEXT"][0]["#"]));

144 }

145 $question->questiontext = addslashes($question->questiontext);

File.php (https://github.com/oskarp/4ME102.git) PHP · 195 lines

1 <?php

2

3 /**

4 * Object providing operations to a physical file on the disk.

5 *

6 * @package PHPTracker

7 * @subpackage File

8 */

9 class PHPTracker_File_File

10 {

11 /**

26 * Initializing the object with the file full path.

27 *

28 * @throws PHPTracker_File_Error_NotExits If the file does not exists.

29 * @param string $path

30 */

editChildProfileSubmit.php (https://github.com/KevinJones/Emotional-Trainer.git) PHP · 210 lines

1 <?php

2 /*

3

6 Moinak Bandyopadhyay, Jessica Blair, Kevin Jones, Mudit Manu Paliwal and Jacob Solomon.

7

8 Filename: editChildProfileSubmit.php

9 Description: This file contains the php code that runs after a caregiver makes changes to a child's profile and clicks submit.

62 // Read the file

63 $fp = fopen($tmpName, 'r');

64 $data = fread($fp, filesize($tmpName));

65 $data = addslashes($data);

66 fclose($fp);

196 }

197

198 header("Location: caregiverHomepage.php");

199 mysql_close($db);

200

ext_ftp.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 265 lines

1 <?hh

2 // @generated by idl-to-hni.php

3

4 /* Sends an ALLO command to the remote FTP server to allocate space for a file

12 <<__Native("ZendCompat")>>

13 function ftp_alloc(mixed $ftp_stream,

14 mixed $filesize,

15 mixed &$result): mixed;

16

250 * host. Why this function may not exist ftp_ssl_connect() is only available

251 * if both the ftp module and the OpenSSL support is built statically into

252 * php, this means that on Windows this function will be undefined in the

253 * official PHP builds. To make this function available on Windows you must

254 * compile your own PHP binaries. ftp_ssl_connect() is not intended for use

255 * with sFTP. To use sFTP with PHP, please see ssh2_sftp().

File.php (https://github.com/andyburton/Sonic-Framework.git) PHP · 526 lines

1 <?php

2

3 // Define namespace

356 case UPLOAD_ERR_INI_SIZE:

357

358 return 'The filesize cannot be more than ' . ini_get ('post_max_size');

359 break;

360

361 case UPLOAD_ERR_FORM_SIZE:

362

363 return 'The filesize cannot be more than ' . $_POST['MAX_FILE_SIZE'];

364 break;

365

VacancyAttachment.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 222 lines

1 <?php

2 /**

3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures

70 * @ORM\Column(name="file_size", type="integer")

71 */

72 private int $fileSize;

73

74 /**

160 * @return int

161 */

162 public function getFileSize(): int

163 {

164 return $this->fileSize;

168 * @param int $fileSize

169 */

170 public function setFileSize(int $fileSize): void

171 {

172 $this->fileSize = $fileSize;

binvolume.c (https://bitbucket.org/ecosynth/ecosynther.git) C · 351 lines

216

217 /* Fill the file header */

218 file_header.filesize = 14 + sizeof(bmp_info_header_t) + data_bytes;

219 file_header.offset = 14 + sizeof(bmp_info_header_t);

220

pun_attachment.php (https://github.com/good2000mo/news.git) PHP · 162 lines

1 <?php

2

3 /**

20 'Create orphans' => 'Enable it if you want to create orphans.',

21 'Always deny' => 'Always deny',

22 'Filesize' => 'File size',

23 'Filename' => 'File name',

24 'Max filesize' => 'Max file size',

64 'Number existing' => 'Existing attachment #<strong>%s</strong>',

65

66 //edit.php

67 'Existing' => 'Existing attachments: ', //Used in edit.php, before the existing attachments that you're allowed to delete

68

69 //attach.php

70 'Download:' => 'Download:',

71 'Attachment added' => 'Attachment added. Redirecting...',

QuestionForm.cs (https://github.com/usmanghani/Quantae.git) C# · 1131 lines

213 public partial class FileUploadAnswerType {

214

215 private string maxFileSizeInBytesField;

216

217 private string minFileSizeInBytesField;

219 /// <remarks/>

220 [System.Xml.Serialization.XmlElementAttribute(DataType="positiveInteger")]

221 public string MaxFileSizeInBytes {

222 get {

223 return this.maxFileSizeInBytesField;

224 }

225 set {

226 this.maxFileSizeInBytesField = value;

227 }

228 }

class-wp-filesystem-ftpsockets.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 327 lines

1 <?php

2 /**

3 * WordPress FTP Sockets Filesystem.

25

26 //Check if possible to use ftp functions.

27 if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )

28 return false;

29 $this->ftp = new ftp();

260

261 function size($file) {

262 return $this->ftp->filesize($file);

263 }

264

uploader-dd-source.mustache (https://bitbucket.org/Quartermain/yui3.git) Mustache · 155 lines

54 multipleFiles: true,

55 swfURL: "{{yuiBuildUrl}}/uploader/assets/flashuploader.swf?t=" + Math.random(),

56 uploadURL: "http://www.yswfblog.com/upload/simpleupload.php",

57 simLimit: 2,

58 withCredentials: false

100 fileTable.append("<tr id='" + fileInstance.get("id") + "_row" + "'>" +

101 "<td class='filename'>" + fileInstance.get("name") + "</td>" +

102 "<td class='filesize'>" + fileInstance.get("size") + "</td>" +

103 "<td class='percentdone'>Hasn't started yet</td>");

104 });

detect.php (https://gitlab.com/RikaPM/VR) PHP · 261 lines

1 <?php

2

3 /**

11 * @link http://getkirby.com

12 * @copyright Bastian Allgeier

13 * @license http://www.opensource.org/licenses/mit-license.php MIT License

14 */

15 class Detect {

25

26 /**

27 * Checks if the required php version is installed

28 *

29 * @param mixed $min

30 * @return boolean

31 */

32 public static function php($min = '5.3') {

33 return version_compare(PHP_VERSION, $min, '>=');

drupal-6.upload.database.php (https://github.com/thomasbennett/tgb.git) PHP · 398 lines

1 <?php

2 // $Id: drupal-6.upload.database.php,v 1.2 2010/11/13 01:48:14 dries Exp $

8 'filepath',

9 'filemime',

10 'filesize',

11 'status',

12 'timestamp',

22 'filepath' => 'sites/default/files/powered-blue-80x15.png',

23 'filemime' => 'image/png',

24 'filesize' => '1011',

25 'status' => '1',

26 'timestamp' => '1285700240',

32 'filepath' => 'sites/default/files/powered-blue-80x15_0.png',

33 'filemime' => 'image/png',

34 'filesize' => '1011',

35 'status' => '1',

36 'timestamp' => '1285700317',

FilesSize.php (https://github.com/quarkness/piwik.git) PHP · 164 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: FilesSize.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Validate_File_Size

24 */

25 // require_once 'Zend/Validate/File/Size.php';

26

27 /**

61 * Sets validator options

62 *

63 * Min limits the used diskspace for all files, when used with max=null it is the maximum filesize

64 * It also accepts an array with the keys 'min' and 'max'

65 *

helper.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 300 lines

28 * @return mixed

29 *

30 * @see http://www.php.net/manual/en/function.filesize.php#71098

31 * @since 11.1

32 */

56 $server = parse_url($url, PHP_URL_HOST);

57 $port = parse_url($url, PHP_URL_PORT);

58 $path = parse_url($url, PHP_URL_PATH);

123 * @return mixed

124 *

125 * @see http://www.php.net/manual/en/function.ftp-chmod.php

126 * @since 11.1

127 */

135 }

136

137 $server = parse_url($url, PHP_URL_HOST);

138 $port = parse_url($url, PHP_URL_PORT);

attachment.html (https://bitbucket.org/tduarte/atmailopen.git) HTML · 156 lines

74 $var['atmailstyle']

75

76 <form name=Compose method=post action="compose.php?sending_attachment=1&unique=$var['unique']" ENCTYPE="multipart/form-data">

77 <input type="hidden" name="func" value="attachment">

78 <input type="hidden" name="unique" value="$var['unique']">

100 <div class="sw">&nbsp; <font class="sw">Bitte auf "Durchsuchen" klicken und Datei auswählen.</font> <br>

101 &nbsp; <font class="sw"></font>

102 <input type="hidden" name="MAX_FILE_SIZE" value="$var['maxfilesize']">

103 <input type="file" class="filebtn" name="fileupload" enctype="multipart/form-data" size="35" value="1" onchange="updateSubmitState()">

104 </div>

users_create.php (https://github.com/ichraffsnicht/ClanSphere-Enhanced.git) PHP · 173 lines

1 <?php

2 // ClanSphere 2010 - www.clansphere.net

3 // $Id$

12 $data = array();

13

14 require_once('mods/gallery/functions.php');

15

16 $cs_option = cs_sql_option(__FILE__,'gallery');

85 if($files_gl['picture']['size']>$cs_option['size2']) {

86 $size = $files_gl['picture']['size'] - $cs_option['size2'];

87 $size = cs_filesize($size);

88 $error .= sprintf($cs_lang['too_big'], $size) . cs_html_br(1);

89 }

94 }

95 if(extension_loaded('gd') AND !empty($gray)) {

96 require_once('mods/gallery/gd_2.php');

97 cs_gray($files_gl['picture']['tmp_name']);

98 }

MediumFactory.php (https://gitlab.com/3dplex/3d-plex-main-site) PHP · 205 lines

1 <?php

2 <<<<<<< HEAD

3 namespace Grav\Common\Page\Medium;

190 >>>>>>> update grav cms

191

192 $size = filesize($file);

193

194 $medium = self::fromFile($file);

files.php (https://github.com/jimmytidey/jimmytidey.co.uk.git) PHP · 136 lines

1 <?php

2 /**

3 * @package Admin

74 if ( ! file_exists( $robots_file ) ) {

75 if ( is_writable( get_home_path() ) ) {

76 $content = '<form action="' . admin_url( 'admin.php?page=wpseo_files' ) . '" method="post" id="robotstxtcreateform">';

77 $content .= wp_nonce_field( 'wpseo_create_robots', '_wpnonce', true, false );

78 $content .= '<p>' . __( 'You don\'t have a robots.txt file, create one here:', 'wordpress-seo' ) . '</p>';

88

89 $content = '';

90 if ( filesize( $robots_file ) > 0 ) {

91 $content = fread( $f, filesize( $robots_file ) );

97 $content .= '<textarea class="large-text code" disabled="disabled" rows="15" name="robotsnew">' . $robots_txt_content . '</textarea><br/>';

98 } else {

99 $content = '<form action="' . admin_url( 'admin.php?page=wpseo_files' ) . '" method="post" id="robotstxtform">';

100 $content .= wp_nonce_field( 'wpseo-robotstxt', '_wpnonce', true, false );

101 $content .= '<p>' . __( 'Edit the content of your robots.txt:', 'wordpress-seo' ) . '</p>';

Attachment.php (https://github.com/snyderp/AIS_IMAP.git) PHP · 248 lines

1 <?php

2 /**

3 * This package contains a series of files that wraps around the functionality

4 * provided by the PHP IMAP extension, and provide an OO interface for interacting

5 * with IMAP mail servers, their messages, and those messages' attachments.

6 *

8 * and written by Peter Snyder.

9 *

10 * PHP Version 5

11 *

12 * @category Mail

116 *

117 * @return void

118 * @see http://www.php.net/manual/en/function.imap-fetchstructure.php

119 */

120 public function __construct($email, $imap_data, $attachment_data)

Storage.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 382 lines

1 <?php

2

3 /**

146 if($this->exists($name))

147 {

148 return filesize($this->path($name));

149 }

150 else throw new InvalidArgumentException("There is no file calls $name");

156 if($self->exists($name))

157 {

158 return filesize($self->path($name));

159 }

160 else throw new InvalidArgumentException("There is no file calls $name");

FilesSize.php (https://github.com/leerbag/zf2.git) PHP · 164 lines

1 <?php

2 /**

3 * Zend Framework

65 * Sets validator options

66 *

67 * Min limits the used diskspace for all files, when used with max=null it is the maximum filesize

68 * It also accepts an array with the keys 'min' and 'max'

69 *

128

129 // limited to 2GB files

130 $size += @filesize($files);

131 $this->_size = $size;

132 if (($max !== null) && ($max < $size)) {

FilesSize.php (https://github.com/shin2/concrete5.git) PHP · 164 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: FilesSize.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Validate_File_Size

24 */

25 require_once 'Zend/Validate/File/Size.php';

26

27 /**

61 * Sets validator options

62 *

63 * Min limits the used diskspace for all files, when used with max=null it is the maximum filesize

64 * It also accepts an array with the keys 'min' and 'max'

65 *

thumb2.php (https://github.com/CMDcentral/CoManD.git) PHP · 192 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2

3 class Thumb2 extends CI_Controller {

62 header ('Accept-Ranges: bytes');

63 header ('Last-Modified: ' . filemtime($this->_cacheFile));

64 header ('Content-Length: ' . filesize($this->_cacheFile));

65 header ('Cache-Control: max-age=9999, must-revalidate');

66

189 }

190

191 /* End of file thumb.php */

192 /* Location: ./application/controllers/thumb.php */

file.php (https://bitbucket.org/Maron1/taqman.git) PHP · 355 lines

1 <?php namespace Laravel; use FilesystemIterator as fIterator;

2

3 class File {

123 public static function size($path)

124 {

125 return filesize($path);

126 }

127

164 * Determine if a file is of a given type.

165 *

166 * The Fileinfo PHP extension is used to determine the file's MIME type.

167 *

168 * <code>

File.php (https://bitbucket.org/acidel/buykoala.git) PHP · 198 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: File.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

23 /** Zend_Pdf_FileParserDataSource */

24 #require_once 'Zend/Pdf/FileParserDataSource.php';

25

26

76 {

77 if (! (is_file($filePath) || is_link($filePath))) {

78 #require_once 'Zend/Pdf/Exception.php';

79 throw new Zend_Pdf_Exception("Invalid file path: $filePath",

80 Zend_Pdf_Exception::BAD_FILE_PATH);

crevold.c (https://github.com/Hdx/Battle.net-Warden.git) C · 207 lines

192 return CREV_FILE_INFO_ERROR;

193 }

194 len = GetFileSize(fhandle, NULL);

195 CloseHandle(fhandle);

196

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 }

fileio.c (https://bitbucket.org/ultra_iter/vim-qt.git) C · 10387 lines

57 #ifdef FEAT_CRYPT

58 static int crypt_method_from_magic __ARGS((char *ptr, int len));

59 static char_u *check_for_cryptkey __ARGS((char_u *cryptkey, char_u *ptr, long *sizep, off_t *filesizep, int newfile, char_u *fname, int *did_ask));

60 #endif

61 #ifdef UNIX

246 long size = 0;

247 char_u *p;

248 off_t filesize = 0;

249 int skip_read = FALSE;

250 #ifdef FEAT_CRYPT

htaccess.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 564 lines

283 <KEYWORD2>CacheLastModifiedFactor</KEYWORD2>

284 <KEYWORD2>CacheMaxExpire</KEYWORD2>

285 <KEYWORD2>CacheMaxFileSize</KEYWORD2>

286 <KEYWORD2>CacheMinFileSize</KEYWORD2>

541 <KEYWORD3>PythonDebug</KEYWORD3>

542

543 <!-- mod_php -->

544 <KEYWORD3>php_value</KEYWORD3>

545 <!-- using 4 for apache 1.x vs 2.x -->

546 <KEYWORD4>php_flag</KEYWORD4>

547

548 <LITERAL2>All</LITERAL2>

PlatformStrategiesWinCE.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 154 lines

130 virtual WTF::String crashedPluginText();

131 virtual WTF::String multipleFileUploadText(unsigned numberOfFiles);

132 virtual WTF::String unknownFileSizeText();

133 virtual WTF::String uploadFileText();

134 virtual WTF::String allFilesText();

FtpPlugin.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 169 lines ✨ Summary

This Java code defines a plugin for the JEdit text editor, specifically an FTP (File Transfer Protocol) plugin. It provides methods to open and save files from an FTP server, as well as initialize the SSH tools home directory with default configuration files. The plugin uses various utility classes and logging mechanisms to handle file operations and errors.

135 MiscUtilities.constructPath(path,"ssh.log"),

136 true);

137 log.setMaxFileSize("100KB");

138 BasicConfigurator.configure(log);

139 }

FileIO.cpp (git://github.com/SingularityCore/Singularity.git) C++ · 434 lines ✨ Summary

This is a C++ class that provides methods for reading and writing files. It has two subclasses, CInFile and COutFile, which provide additional functionality for input and output files respectively. The code defines several member functions, including Open(), Create(), SetTime(), WritePart(), Write(), Seek(), and SetLength().

183

184 DWORD sizeHigh;

185 DWORD sizeLow = ::GetFileSize(_handle, &sizeHigh);

186 if (sizeLow == 0xFFFFFFFF)

187 if (::GetLastError() != NO_ERROR)

237 fileInfo.MTime = winFileInfo.ftLastWriteTime;

238 fileInfo.VolumeSerialNumber = winFileInfo.dwFileAttributes;

239 fileInfo.Size = (((UInt64)winFileInfo.nFileSizeHigh) << 32) + winFileInfo.nFileSizeLow;

240 fileInfo.NumberOfLinks = winFileInfo.nNumberOfLinks;

241 fileInfo.FileIndex = (((UInt64)winFileInfo.nFileIndexHigh) << 32) + winFileInfo.nFileIndexLow;

lizztp2.gif (git://github.com/zhaowe/bc.git) Unknown · 12 lines

7 vti_lastheight:IX|28

8 vti_cacheddtm:TX|26 Mar 2009 02:10:13 -0000

9 vti_filesize:IR|2182

10 vti_extenderversion:SR|4.0.2.7802

11 vti_backlinkinfo:VX|ccs_jt/ccs_input_index.asp ccs_jt/ccs_lu_xg.asp ccs_jt/ccs_ser.asp ccs_jt/ccs_bm_ser1.asp

directives.html.tr.utf8 (git://github.com/apache/httpd.git) Unknown · 769 lines

180 <li><a href="mod_cache.html#cachelockpath">CacheLockPath</a></li>

181 <li><a href="mod_cache.html#cachemaxexpire">CacheMaxExpire</a></li>

182 <li><a href="mod_cache_disk.html#cachemaxfilesize">CacheMaxFileSize</a></li>

183 <li><a href="mod_cache.html#cacheminexpire">CacheMinExpire</a></li>

184 <li><a href="mod_cache_disk.html#cacheminfilesize">CacheMinFileSize</a></li>

ba0_right.gif (git://github.com/zhaowe/bc.git) Unknown · 12 lines

7 vti_lastheight:IX|36

8 vti_cacheddtm:TX|26 Mar 2009 02:10:53 -0000

9 vti_filesize:IR|230

10 vti_extenderversion:SR|4.0.2.7802

11 vti_backlinkinfo:VX|

bmysglsm3.gif (git://github.com/zhaowe/bc.git) Unknown · 12 lines

7 vti_lastheight:IX|28

8 vti_cacheddtm:TX|26 Mar 2009 02:10:01 -0000

9 vti_filesize:IR|1690

10 vti_extenderversion:SR|4.0.2.7802

11 vti_backlinkinfo:VX|ccs_jt/ccs_bm_rzcx.asp