xref: /php-src/ext/standard/dir.stub.php (revision e8a1781c)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var string
7 * @cvalue dirsep_str
8 */
9const DIRECTORY_SEPARATOR = UNKNOWN;
10/**
11 * @var string
12 * @cvalue pathsep_str
13 */
14const PATH_SEPARATOR = UNKNOWN;
15
16#ifdef HAVE_GLOB
17#if (defined(GLOB_BRACE) && GLOB_BRACE != 0)
18/**
19 * @var int
20 * @cvalue GLOB_BRACE
21 */
22const GLOB_BRACE = UNKNOWN;
23#endif
24#if (defined(GLOB_ERR) && GLOB_ERR != 0)
25/**
26 * @var int
27 * @cvalue GLOB_ERR
28 */
29const GLOB_ERR = UNKNOWN;
30#endif
31#if (defined(GLOB_MARK) && GLOB_MARK != 0)
32/**
33 * @var int
34 * @cvalue GLOB_MARK
35 */
36const GLOB_MARK = UNKNOWN;
37#endif
38#if (defined(GLOB_NOCHECK) && GLOB_NOCHECK != 0)
39/**
40 * @var int
41 * @cvalue GLOB_NOCHECK
42 */
43const GLOB_NOCHECK = UNKNOWN;
44#endif
45#if (defined(GLOB_NOESCAPE) && GLOB_NOESCAPE != 0)
46/**
47 * @var int
48 * @cvalue GLOB_NOESCAPE
49 */
50const GLOB_NOESCAPE = UNKNOWN;
51#endif
52#if (defined(GLOB_NOSORT) && GLOB_NOSORT != 0)
53/**
54 * @var int
55 * @cvalue GLOB_NOSORT
56 */
57const GLOB_NOSORT = UNKNOWN;
58#endif
59#ifdef GLOB_ONLYDIR
60/**
61 * @var int
62 * @cvalue GLOB_ONLYDIR
63 */
64const GLOB_ONLYDIR = UNKNOWN;
65#endif
66#ifdef GLOB_AVAILABLE_FLAGS
67/**
68 * @var int
69 * @cvalue GLOB_AVAILABLE_FLAGS
70 */
71const GLOB_AVAILABLE_FLAGS = UNKNOWN;
72#endif
73#endif
74/**
75 * @var int
76 * @cvalue PHP_SCANDIR_SORT_ASCENDING
77 */
78const SCANDIR_SORT_ASCENDING = UNKNOWN;
79/**
80 * @var int
81 * @cvalue PHP_SCANDIR_SORT_DESCENDING
82 */
83const SCANDIR_SORT_DESCENDING = UNKNOWN;
84/**
85 * @var int
86 * @cvalue PHP_SCANDIR_SORT_NONE
87 */
88const SCANDIR_SORT_NONE = UNKNOWN;
89
90/**
91 * @strict-properties
92 * @not-serializable
93 */
94final class Directory
95{
96    public readonly string $path;
97
98    /** @var resource */
99    public readonly mixed $handle;
100
101    /**
102     * @implementation-alias closedir
103     */
104    public function close(): void {}
105
106    /**
107     * @implementation-alias rewinddir
108     */
109    public function rewind(): void {}
110
111    /**
112     * @implementation-alias readdir
113     */
114    public function read(): string|false {}
115}
116