1 | <?php |
||
23 | class SplFileInfo extends FinderSplFileInfo |
||
24 | { |
||
25 | /** |
||
26 | * @var FinderSplFileInfo |
||
27 | */ |
||
28 | private $decorated; |
||
29 | |||
30 | /** |
||
31 | * @var Reader |
||
32 | */ |
||
33 | private $reader; |
||
34 | |||
35 | /** |
||
36 | * Load decorated object |
||
37 | */ |
||
38 | public function __construct(FinderSplFileInfo $decorated) |
||
42 | |||
43 | /** |
||
44 | * Get reader for the contents of this file |
||
45 | * |
||
46 | * @throws ReaderException If file contains syntax errors |
||
47 | */ |
||
48 | public function getReader(): Reader |
||
60 | |||
61 | /** |
||
62 | * Returns the relative path |
||
63 | */ |
||
64 | public function getRelativePath(): string |
||
68 | |||
69 | /** |
||
70 | * Returns the relative path name |
||
71 | */ |
||
72 | public function getRelativePathname(): string |
||
76 | |||
77 | /** |
||
78 | * Returns the contents of the file |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getContents() |
||
86 | |||
87 | /** |
||
88 | * Gets the last access time for the file |
||
89 | */ |
||
90 | public function getATime(): int |
||
94 | |||
95 | /** |
||
96 | * Returns the base name of the file, directory, or link without path info |
||
97 | */ |
||
98 | public function getBasename($suffix = ''): string |
||
102 | |||
103 | /** |
||
104 | * Returns the inode change time for the file |
||
105 | */ |
||
106 | public function getCTime(): int |
||
110 | |||
111 | /** |
||
112 | * Retrieves the file extension |
||
113 | */ |
||
114 | public function getExtension(): string |
||
118 | |||
119 | /** |
||
120 | * Gets an SplFileInfo object for the referenced file |
||
121 | * |
||
122 | * @param string $class_name |
||
123 | */ |
||
124 | public function getFileInfo($class_name = ''): \SplFileInfo |
||
128 | |||
129 | /** |
||
130 | * Gets the filename without any path information |
||
131 | */ |
||
132 | public function getFilename(): string |
||
136 | |||
137 | /** |
||
138 | * Gets the file group |
||
139 | */ |
||
140 | public function getGroup(): int |
||
144 | |||
145 | /** |
||
146 | * Gets the inode number for the filesystem object |
||
147 | */ |
||
148 | public function getInode(): int |
||
152 | |||
153 | /** |
||
154 | * Gets the target of a filesystem link |
||
155 | */ |
||
156 | public function getLinkTarget(): sring |
||
160 | |||
161 | /** |
||
162 | * Returns the time when the contents of the file were changed |
||
163 | */ |
||
164 | public function getMTime(): int |
||
168 | |||
169 | /** |
||
170 | * Gets the file owner |
||
171 | */ |
||
172 | public function getOwner(): int |
||
176 | |||
177 | /** |
||
178 | * Returns the path to the file, omitting the filename and any trailing slash |
||
179 | */ |
||
180 | public function getPath(): string |
||
184 | |||
185 | /** |
||
186 | * Gets an SplFileInfo object for the parent of the current file |
||
187 | * |
||
188 | * @param string $class_name |
||
189 | */ |
||
190 | public function getPathInfo($class_name = ''): \SplFileInfo |
||
194 | |||
195 | /** |
||
196 | * Returns the path to the file |
||
197 | * |
||
198 | * @return string |
||
199 | */ |
||
200 | public function getPathname() |
||
204 | |||
205 | /** |
||
206 | * Gets the file permissions for the file |
||
207 | */ |
||
208 | public function getPerms(): int |
||
212 | |||
213 | /** |
||
214 | * Expands all symbolic links and resolves relative references |
||
215 | * |
||
216 | * @return string |
||
217 | */ |
||
218 | public function getRealPath() |
||
222 | |||
223 | /** |
||
224 | * Returns the filesize in bytes for the file referenced |
||
225 | */ |
||
226 | public function getSize(): int |
||
230 | |||
231 | /** |
||
232 | * Returns the type of the file referenced |
||
233 | */ |
||
234 | public function getType(): string |
||
238 | |||
239 | /** |
||
240 | * This method can be used to determine if the file is a directory |
||
241 | */ |
||
242 | public function isDir(): bool |
||
246 | |||
247 | /** |
||
248 | * Checks if the file is executable |
||
249 | */ |
||
250 | public function isExecutable(): bool |
||
254 | |||
255 | /** |
||
256 | * Checks if the file referenced exists and is a regular file |
||
257 | */ |
||
258 | public function isFile(): bool |
||
262 | |||
263 | /** |
||
264 | * Check if the file referenced is a link |
||
265 | */ |
||
266 | public function isLink(): bool |
||
270 | |||
271 | /** |
||
272 | * Check if the file is readable |
||
273 | */ |
||
274 | public function isReadable(): bool |
||
278 | |||
279 | /** |
||
280 | * Check if the file is writable |
||
281 | */ |
||
282 | public function isWritable(): bool |
||
286 | |||
287 | /** |
||
288 | * Creates an SplFileObject object of the file |
||
289 | * |
||
290 | * @param string $open_mode |
||
291 | * @param boolean $use_include_path |
||
292 | * @param resource $context |
||
293 | * @return \SplFileObject |
||
294 | */ |
||
295 | public function openFile($open_mode = "r", $use_include_path = false, $context = null) |
||
299 | |||
300 | /** |
||
301 | * Set the class name which will be used to open files when openFile() is called |
||
302 | * |
||
303 | * @param string $class_name |
||
304 | * @return void |
||
305 | */ |
||
306 | public function setFileClass($class_name = '') |
||
310 | |||
311 | /** |
||
312 | * Set the class name which will be used when getFileInfo and getPathInfo are called |
||
313 | * |
||
314 | * @param string $class_name |
||
315 | * @return void |
||
316 | */ |
||
317 | public function setInfoClass($class_name = '') |
||
321 | |||
322 | /** |
||
323 | * This method will return the file name of the referenced file |
||
324 | * |
||
325 | * @return string |
||
326 | */ |
||
327 | public function __tostring() |
||
331 | } |
||
332 |