Home
last modified time | relevance | path

Searched refs:ftruncate (Results 1 – 25 of 47) sorted by path

12

/php-src/ext/opcache/
H A Dconfig.m4280 if (ftruncate(fd, 4096) < 0) {
H A Dshared_alloc_posix.c99 if (ftruncate(shared_segment->shm_fd, requested_size) != 0) { in create_segments()
/php-src/ext/pcre/pcre2lib/sljit/allocator_src/
H A DsljitProtExecAllocatorPosix.c140 if (ftruncate(fd, (off_t)size)) { in alloc_chunk()
/php-src/ext/session/
H A Dmod_files.c241 php_ignore_value(ftruncate(data->fd, 0)); in ps_files_write()
/php-src/ext/spl/
H A Dspl_directory.c2683 PHP_METHOD(SplFileObject, ftruncate) in PHP_METHOD() argument
H A Dspl_directory.stub.php295 public function ftruncate(int $size): bool {} function in SplFileObject
H A Dspl_directory_arginfo.h352 ZEND_METHOD(SplFileObject, ftruncate);
464 ZEND_ME(SplFileObject, ftruncate, arginfo_class_SplFileObject_ftruncate, ZEND_ACC_PUBLIC)
/php-src/ext/spl/tests/SplFileObject/
H A DSplFileObject_ftruncate_error_001.phpt2 SplFileObject::ftruncate function - truncating with stream that does not support truncation
27 $obj->ftruncate(1);
H A Dfileobject_005.phpt14 var_dump($fo->ftruncate(4));
/php-src/ext/standard/
H A Dbasic_functions.stub.php2815 function ftruncate($stream, int $size): bool {}
H A Dbasic_functions_arginfo.h2652 ZEND_FUNCTION(ftruncate);
3288 ZEND_FE(ftruncate, arginfo_ftruncate)
H A Dfile.c1375 PHP_FUNCTION(ftruncate) in PHP_FUNCTION() argument
H A Dflock_compat.h57 # define ftruncate(a, b) chsize(a, b) macro
/php-src/ext/standard/tests/file/
H A Dbug71882.phpt2 Bug #71882 (Negative ftruncate() on php://memory exhausts memory)
7 var_dump(ftruncate($fd, -1));
13 ftruncate(): Argument #2 ($size) must be greater than or equal to 0
H A Dfilesize_variation3.phpt20 var_dump( ftruncate($file_handle, $size) );
60 ftruncate(): Argument #2 ($size) must be greater than or equal to 0
H A Dfilesize_variation4-win32.phpt51 var_dump( ftruncate($file_handle, 220) ); //creating 4 bytes of hole
H A Dfilesize_variation4.phpt53 var_dump( ftruncate($file_handle, 220) ); //creating 4 bytes of hole
H A Dftruncate.phpt2 ftruncate() tests
6 $filename = __DIR__."/ftruncate.dat";
11 var_dump(ftruncate($fp, 10));
16 var_dump(ftruncate($fp, 10));
23 var_dump(ftruncate($fp, 10));
28 var_dump(ftruncate($fp, 0));
36 var_dump(ftruncate($fp, -1000000000));
55 ftruncate(): Argument #2 ($size) must be greater than or equal to 0
H A Dftruncate_bug76422.phpt2 Bug #76422 ftruncate fails on files > 2GB
24 /* Check if ftruncate() with 2GB works. If it doesn't, it's likely that large files are
27 $ftruncate_result = ftruncate($file_handle, $truncate_offset);
36 $ftruncate_result = ftruncate($file_handle, $truncate_offset);
H A Dftruncate_bug76803.phpt2 Bug #76803 ftruncate changes file pointer
10 ftruncate($f, 2);
17 ftruncate($f, 2);
23 ftruncate($f, 2); // in 7.3 changes file pointer to 2
H A Dftruncate_bug77081.phpt2 Bug #77081 ftruncate() changes seek pointer in c mode
10 ftruncate($stream, 0);
H A Dftruncate_error.phpt2 Test ftruncate() function : error conditions
5 echo "*** Testing ftruncate() : error conditions ***\n";
9 fwrite($file_handle, "Testing ftruncate error conditions \n");
13 // ftruncate() on a file handle which is already closed/unset
14 echo "-- Testing ftruncate() with closed/unset file handle --\n";
16 // ftruncate on close file handle
19 var_dump( ftruncate($file_handle,10) );
34 *** Testing ftruncate() : error conditions ***
37 -- Testing ftruncate() with closed/unset file handle --
38 ftruncate(): supplied resource is not a valid stream resource
H A Dftruncate_variation1-win32-mb.phpt14 echo "*** Testing ftruncate() : usage variations ***\n";
16 /* test ftruncate with file opened in different modes */
67 *** Testing ftruncate() : usage variations ***
71 -- Testing ftruncate(): truncate file to size = 0 --
79 -- Testing ftruncate(): truncate file to size = 0 --
87 -- Testing ftruncate(): truncate file to size = 0 --
95 -- Testing ftruncate(): truncate file to size = 0 --
103 -- Testing ftruncate(): truncate file to size = 0 --
111 -- Testing ftruncate(): truncate file to size = 0 --
119 -- Testing ftruncate(): truncate file to size = 0 --
[all …]
H A Dftruncate_variation1-win32.phpt14 echo "*** Testing ftruncate() : usage variations ***\n";
16 /* test ftruncate with file opened in different modes */
67 *** Testing ftruncate() : usage variations ***
71 -- Testing ftruncate(): truncate file to size = 0 --
79 -- Testing ftruncate(): truncate file to size = 0 --
87 -- Testing ftruncate(): truncate file to size = 0 --
95 -- Testing ftruncate(): truncate file to size = 0 --
103 -- Testing ftruncate(): truncate file to size = 0 --
111 -- Testing ftruncate(): truncate file to size = 0 --
119 -- Testing ftruncate(): truncate file to size = 0 --
[all …]
H A Dftruncate_variation1.phpt14 echo "*** Testing ftruncate() : usage variations ***\n";
16 /* test ftruncate with file opened in different modes */
67 *** Testing ftruncate() : usage variations ***
71 -- Testing ftruncate(): truncate file to size = 0 --
79 -- Testing ftruncate(): truncate file to size = 0 --
87 -- Testing ftruncate(): truncate file to size = 0 --
95 -- Testing ftruncate(): truncate file to size = 0 --
103 -- Testing ftruncate(): truncate file to size = 0 --
111 -- Testing ftruncate(): truncate file to size = 0 --
119 -- Testing ftruncate(): truncate file to size = 0 --
[all …]

Completed in 72 milliseconds

12