php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
spl_directory.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Marcus Boerger <helly@php.net> |
14 +----------------------------------------------------------------------+
15 */
16
17#ifndef SPL_DIRECTORY_H
18#define SPL_DIRECTORY_H
19
20#include "php.h"
21
29
30PHP_MINIT_FUNCTION(spl_directory);
31
32/* Internal objecte structure and helpers for Directory and File SPL objects */
34
37
39
44
45typedef enum {
46 SPL_FS_INFO, /* must be 0 */
50
90
91#define SPL_FILE_OBJECT_DROP_NEW_LINE 0x00000001 /* drop new lines */
92#define SPL_FILE_OBJECT_READ_AHEAD 0x00000002 /* read on rewind/next */
93#define SPL_FILE_OBJECT_SKIP_EMPTY 0x00000004 /* skip empty lines */
94#define SPL_FILE_OBJECT_READ_CSV 0x00000008 /* read via fgetcsv */
95#define SPL_FILE_OBJECT_MASK 0x0000000F /* read via fgetcsv */
96
97#define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x00000000 /* make RecursiveDirectoryTree::current() return SplFileInfo */
98#define SPL_FILE_DIR_CURRENT_AS_SELF 0x00000010 /* make RecursiveDirectoryTree::current() return getSelf() */
99#define SPL_FILE_DIR_CURRENT_AS_PATHNAME 0x00000020 /* make RecursiveDirectoryTree::current() return getPathname() */
100#define SPL_FILE_DIR_CURRENT_MODE_MASK 0x000000F0 /* mask RecursiveDirectoryTree::current() */
101#define SPL_FILE_DIR_CURRENT(intern,mode) ((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
102
103#define SPL_FILE_DIR_KEY_AS_PATHNAME 0x00000000 /* make RecursiveDirectoryTree::key() return getPathname() */
104#define SPL_FILE_DIR_KEY_AS_FILENAME 0x00000100 /* make RecursiveDirectoryTree::key() return getFilename() */
105#define SPL_FILE_DIR_KEY_MODE_MASK 0x00000F00 /* mask RecursiveDirectoryTree::key() */
106#define SPL_FILE_NEW_CURRENT_AND_KEY SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO
107#define SPL_FILE_DIR_KEY(intern,mode) ((intern->flags&SPL_FILE_DIR_KEY_MODE_MASK)==mode)
108
109#define SPL_FILE_DIR_SKIPDOTS 0x00001000 /* Tells whether it should skip dots or not */
110#define SPL_FILE_DIR_UNIXPATHS 0x00002000 /* Whether to unixify path separators */
111#define SPL_FILE_DIR_FOLLOW_SYMLINKS 0x00004000 /* make RecursiveDirectoryTree::hasChildren() follow symlinks */
112#define SPL_FILE_DIR_OTHERS_MASK 0x00007000 /* mask used for get/setFlags */
113
114#endif /* SPL_DIRECTORY_H */
file(string $filename, int $flags=0, $context=null)
dir(string $directory, $context=null)
uint32_t u
Definition cdf.c:78
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHPAPI
Definition php.h:71
struct _php_stream php_stream
Definition php_streams.h:96
struct _php_stream_context php_stream_context
Definition php_streams.h:98
struct _php_stream_dirent php_stream_dirent
PHPAPI zend_class_entry * spl_ce_FilesystemIterator
PHPAPI zend_class_entry * spl_ce_SplFileObject
PHPAPI zend_class_entry * spl_ce_SplTempFileObject
PHPAPI zend_class_entry * spl_ce_SplFileInfo
PHPAPI zend_class_entry * spl_ce_GlobIterator
PHPAPI zend_class_entry * spl_ce_DirectoryIterator
PHPAPI zend_class_entry * spl_ce_RecursiveDirectoryIterator
PHPAPI zend_string * spl_filesystem_object_get_path(const spl_filesystem_object *intern)
SPL_FS_OBJ_TYPE
@ SPL_FS_INFO
@ SPL_FS_FILE
@ SPL_FS_DIR
struct _spl_filesystem_object spl_filesystem_object
void(* spl_foreign_clone_t)(spl_filesystem_object *src, spl_filesystem_object *dst)
void(* spl_foreign_dtor_t)(spl_filesystem_object *object)
struct _spl_other_handler spl_other_handler
zend_function * func_next
SPL_FS_OBJ_TYPE type
zend_function * func_rewind
zend_function * func_valid
php_stream_context * context
zend_string * current_line
zend_string * file_name
php_stream_dirent entry
const spl_other_handler * oth_handler
zend_class_entry * file_class
zend_string * orig_path
zend_string * open_mode
zend_function * func_getCurr
zend_class_entry * info_class
spl_foreign_dtor_t dtor
spl_foreign_clone_t clone
struct _zval_struct zval
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
union _zend_function zend_function
int32_t zend_long
Definition zend_long.h:42
struct _zend_string zend_string
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
object