Home
last modified time | relevance | path

Searched refs:file_handle (Results 1 – 25 of 311) sorted by relevance

12345678910>>...13

/php-src/Zend/
H A Dzend_stream.c60 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle); in zend_stream_fsize()
131 if (file_handle->buf) { in zend_stream_fixup()
132 *buf = file_handle->buf; in zend_stream_fixup()
133 *len = file_handle->len; in zend_stream_fixup()
149 file_handle->handle.stream.handle = file_handle->handle.fp; in zend_stream_fixup()
172 file_handle->buf = *buf; in zend_stream_fixup()
173 file_handle->len = size; in zend_stream_fixup()
193 file_handle->len = size; in zend_stream_fixup()
205 memset(file_handle->buf + file_handle->len, 0, ZEND_MMAP_AHEAD); in zend_stream_fixup()
207 *buf = file_handle->buf; in zend_stream_fixup()
[all …]
H A Dzend_dtrace.c25 ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
44 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type) in dtrace_compile_file() argument
47 DTRACE_COMPILE_FILE_ENTRY(ZSTR_VAL(file_handle->opened_path), ZSTR_VAL(file_handle->filename)); in dtrace_compile_file()
48 res = compile_file(file_handle, type); in dtrace_compile_file()
49 DTRACE_COMPILE_FILE_RETURN(ZSTR_VAL(file_handle->opened_path), ZSTR_VAL(file_handle->filename)); in dtrace_compile_file()
/php-src/ext/standard/tests/file/
H A Dfscanf_error.phpt9 $file_handle = fopen($filename, 'w');
10 if ($file_handle == false)
12 fwrite($file_handle, "hello world");
13 fclose($file_handle);
17 fscanf($file_handle, "%s");
23 $file_handle = fopen($filename, 'r');
24 if ($file_handle == false)
31 fclose($file_handle);
39 $file_handle = fopen($filename, 'r');
40 if ($file_handle == false)
[all …]
H A Dfdatasync.phpt17 $file_handle = fopen($filename, "w");
18 if($file_handle == false)
26 var_dump( fwrite($file_handle, $data) );
27 var_dump( fdatasync($file_handle) );
31 $return_value = fdatasync($file_handle);
33 fclose($file_handle);
36 $file_handle = fopen("php://stdin", "w");
37 var_dump(fdatasync($file_handle));
38 fclose($file_handle);
42 $return_value = fdatasync($file_handle);
[all …]
H A Dfsync.phpt17 $file_handle = fopen($filename, "w");
18 if($file_handle == false)
26 var_dump( fwrite($file_handle, $data) );
27 var_dump( fsync($file_handle) );
31 $return_value = fsync($file_handle);
33 fclose($file_handle);
36 $file_handle = fopen("php://stdin", "w");
37 var_dump(fsync($file_handle));
38 fclose($file_handle);
42 $return_value = fsync($file_handle);
[all …]
H A Dfscanf_variation1.phpt14 $file_handle = fopen($filename, "w");
15 if($file_handle == false)
17 @fwrite($file_handle, "hello_world ");
18 @fwrite($file_handle, 12345);
19 fclose($file_handle);
22 $file_handle = fopen($filename, "r");
24 $return_value = fscanf($file_handle, "%s");
26 fclose($file_handle);
H A Dfilesize_variation4-win32.phpt20 $file_handle = fopen($filename, "w");
22 fwrite($file_handle, $string);
23 fclose($file_handle);
30 fwrite($file_handle, $string);
31 fclose($file_handle);
36 $file_handle = fopen($filename, "a");
37 fwrite($file_handle, "Hello, world");
38 fclose($file_handle);
45 fclose($file_handle);
52 fclose($file_handle);
[all …]
H A Dfscanf_variation54.phpt27 $file_handle = fopen($filename, "w");
28 if($file_handle == false)
31 fwrite($file_handle, $obj);
34 fclose($file_handle);
42 $file_handle = fopen($filename, "r");
43 if($file_handle == false) {
49 var_dump( fscanf($file_handle,$format) );
50 rewind($file_handle);
53 fclose($file_handle);
H A Dfilesize_variation4.phpt22 $file_handle = fopen($filename, "w");
24 fwrite($file_handle, $string);
25 fclose($file_handle);
32 fwrite($file_handle, $string);
33 fclose($file_handle);
38 $file_handle = fopen($filename, "a");
39 fwrite($file_handle, "Hello, world");
40 fclose($file_handle);
47 fclose($file_handle);
54 fclose($file_handle);
[all …]
H A D007_variation8.phpt17 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea…
18 var_dump($file_handle); //Check for the content of handle
19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation18.phpt19 $file_handle = fopen($file, "r+b"); //opening the file in "r+b" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation2.phpt19 $file_handle = fopen($file, "r+"); //opening the file in "r+" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation10.phpt19 $file_handle = fopen($file, "r+t"); //opening the file in "r+t" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation15.phpt26 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea…
27 var_dump($file_handle); //Check for the content of handle
28 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
29 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
30 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
31 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
32 rewind($file_handle);
33 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
35 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
36 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation16.phpt17 $file_handle = fopen($file, "x+t"); //opening the non-existing file in "x+t" mode, file will be cr…
18 var_dump($file_handle); //Check for the content of handle
19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation23.phpt17 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea…
18 var_dump($file_handle); //Check for the content of handle
19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation24.phpt17 $file_handle = fopen($file, "x+b"); //opening the non-existing file in "x+b" mode, file will be cr…
18 var_dump($file_handle); //Check for the content of handle
19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the…
25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation7.phpt17 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created
18 var_dump($file_handle); //Check for the content of handle
19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
[all …]
H A D007_variation17.phpt19 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation1.phpt19 $file_handle = fopen($file, "r"); //opening the file in "r" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A D007_variation9.phpt19 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( ftell($file_handle) ); //Initial position of file pointer
23 var_dump( fread($file_handle, 100) ); //Check for read operation
24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails
25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
H A Dfflush_variation4.phpt22 $file_handle = fopen($file_name, "w");
23 if($file_handle == false)
25 fclose($file_handle);
28 $file_handle = fopen($file_name, $mode);
29 if($file_handle == false)
31 var_dump( fflush($file_handle) );
32 fclose($file_handle);
H A Dflock_basic.phpt14 $file_handle = fopen($lock_file, "w");
15 var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
16 var_dump(flock($file_handle, LOCK_UN));
17 var_dump(flock($file_handle, LOCK_EX));
18 var_dump(flock($file_handle, LOCK_UN));
19 fclose($file_handle);
H A Dpopen_pclose_basic.phpt20 $file_handle = popen(CMD, 'r');
21 fpassthru($file_handle);
22 pclose($file_handle);
29 $file_handle = popen($command, "r");
30 $return_value = fpassthru($file_handle);
33 pclose($file_handle);
38 $file_handle = popen("sort", "w");
42 fwrite($file_handle, $str);
43 fwrite($file_handle, $newline);
45 pclose($file_handle);
H A D007_variation14.phpt19 $file_handle = fopen($file, "a+t"); //opening the file "a+t" mode
20 var_dump($file_handle); //Check for the content of handle
21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
22 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
23 rewind($file_handle);
24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file
25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation

Completed in 23 milliseconds

12345678910>>...13