Back to index

php5  5.3.10
php_stream_plain_wrapper.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Wez Furlong <wez@thebrainroom.com>                           |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: php_stream_plain_wrapper.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 /* definitions for the plain files wrapper */
00022 
00023 /* operations for a plain file; use the php_stream_fopen_XXX funcs below */
00024 PHPAPI extern php_stream_ops php_stream_stdio_ops;
00025 PHPAPI extern php_stream_wrapper php_plain_files_wrapper;
00026 
00027 BEGIN_EXTERN_C()
00028 
00029 /* like fopen, but returns a stream */
00030 PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char **opened_path, int options STREAMS_DC TSRMLS_DC);
00031 #define php_stream_fopen(filename, mode, opened) _php_stream_fopen((filename), (mode), (opened), 0 STREAMS_CC TSRMLS_CC)
00032 
00033 PHPAPI php_stream *_php_stream_fopen_with_path(char *filename, char *mode, char *path, char **opened_path, int options STREAMS_DC TSRMLS_DC);
00034 #define php_stream_fopen_with_path(filename, mode, path, opened)      _php_stream_fopen_with_path((filename), (mode), (path), (opened) STREAMS_CC TSRMLS_CC)
00035 
00036 PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STREAMS_DC TSRMLS_DC);
00037 #define php_stream_fopen_from_file(file, mode)   _php_stream_fopen_from_file((file), (mode) STREAMS_CC TSRMLS_CC)
00038 
00039 PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC);
00040 #define php_stream_fopen_from_fd(fd, mode, persistent_id)      _php_stream_fopen_from_fd((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC)
00041 
00042 PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STREAMS_DC TSRMLS_DC);
00043 #define php_stream_fopen_from_pipe(file, mode)   _php_stream_fopen_from_pipe((file), (mode) STREAMS_CC TSRMLS_CC)
00044 
00045 PHPAPI php_stream *_php_stream_fopen_tmpfile(int dummy STREAMS_DC TSRMLS_DC);
00046 #define php_stream_fopen_tmpfile() _php_stream_fopen_tmpfile(0 STREAMS_CC TSRMLS_CC)
00047 
00048 PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char *pfx, char **opened_path STREAMS_DC TSRMLS_DC);
00049 #define php_stream_fopen_temporary_file(dir, pfx, opened_path) _php_stream_fopen_temporary_file((dir), (pfx), (opened_path) STREAMS_CC TSRMLS_CC)
00050 
00051 /* This is a utility API for extensions that are opening a stream, converting it
00052  * to a FILE* and then closing it again.  Be warned that fileno() on the result
00053  * will most likely fail on systems with fopencookie. */
00054 PHPAPI FILE * _php_stream_open_wrapper_as_file(char * path, char * mode, int options, char **opened_path STREAMS_DC TSRMLS_DC);
00055 #define php_stream_open_wrapper_as_file(path, mode, options, opened_path) _php_stream_open_wrapper_as_file((path), (mode), (options), (opened_path) STREAMS_CC TSRMLS_CC)
00056 
00057 END_EXTERN_C()
00058 
00059 /*
00060  * Local variables:
00061  * tab-width: 4
00062  * c-basic-offset: 4
00063  * End:
00064  * vim600: sw=4 ts=4 fdm=marker
00065  * vim<600: sw=4 ts=4
00066  */