xref: /PHP-8.0/ext/fileinfo/fileinfo.stub.php (revision fd5ff37d)
1<?php
2
3/** @generate-function-entries */
4
5class finfo
6{
7    /** @alias finfo_open */
8    public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
9
10    /**
11     * @param resource|null $context
12     * @return string|false
13     * @alias finfo_file
14     */
15    public function file(string $filename, int $flags = FILEINFO_NONE, $context = null) {}
16
17    /**
18     * @param resource|null $context
19     * @return string|false
20     * @alias finfo_buffer
21     */
22    public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null) {}
23
24    /**
25     * @return bool
26     * @alias finfo_set_flags
27     */
28    public function set_flags(int $flags) {}
29}
30
31/** @return resource|false */
32function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
33
34/**
35 * @param resource $finfo
36 */
37function finfo_close($finfo): bool {}
38
39/**
40 * @param resource $finfo
41 */
42function finfo_set_flags($finfo, int $flags): bool {}
43
44/**
45 * @param resource $finfo
46 * @param resource|null $context
47 */
48function finfo_file($finfo, string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
49
50/**
51 * @param resource $finfo
52 * @param resource|null $context
53 */
54function finfo_buffer($finfo, string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
55
56/**
57 * @param resource|string $filename
58 */
59function mime_content_type($filename): string|false {}
60