1 <?hh // decl /* -*- php -*- */
3 * Copyright (c) 2014, Facebook, Inc.
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the "hack" directory of this source tree.
11 const resource STDIN = /* UNSAFE_EXPR */ 0;
12 const resource STDOUT = /* UNSAFE_EXPR */ 0;
13 const resource STDERR = /* UNSAFE_EXPR */ 0;
15 const PATHINFO_DIRNAME = 0;
16 const PATHINFO_BASENAME = 0;
17 const PATHINFO_EXTENSION = 0;
18 const PATHINFO_FILENAME = 0;
19 const DIRECTORY_SEPARATOR = "/";
20 const PATH_SEPARATOR = ":";
22 const UPLOAD_ERR_OK = 0;
23 const UPLOAD_ERR_INI_SIZE = 1;
24 const UPLOAD_ERR_FORM_SIZE = 2;
25 const UPLOAD_ERR_PARTIAL = 3;
26 const UPLOAD_ERR_NO_FILE = 4;
27 const UPLOAD_ERR_NO_TMP_DIR = 6;
28 const UPLOAD_ERR_CANT_WRITE = 7;
29 const UPLOAD_ERR_EXTENSION = 8;
31 const FILE_APPEND = 0;
32 const FILE_USE_INCLUDE_PATH = 0;
33 const FILE_IGNORE_NEW_LINES = 0;
34 const FILE_NO_DEFAULT_CONTEXT = 0;
35 const FILE_SKIP_EMPTY_LINES = 0;
46 const INI_SCANNER_NORMAL = 0;
47 const INT_SCANNER_RAW = 0;
51 const GLOB_NOSORT = 4;
52 const GLOB_NOCHECK = 16;
53 const GLOB_ESCAPE = 64;
54 const GLOB_BRACE = 1024;
55 const GLOB_ONLYDIR = 8129;
58 function fopen($filename, $mode, $use_include_path = false, $context = null);
60 function popen($command, $mode);
62 function fclose($handle);
64 function pclose($handle);
66 function fseek($handle, $offset, $whence = SEEK_SET);
68 function rewind($handle);
70 function ftell($handle);
72 function feof($handle);
74 function fstat($handle);
76 function fread($handle, $length);
78 function fgetc($handle);
80 function fgets($handle, $length = 0);
82 function fgetss($handle, $length = 0, $allowable_tags = null);
83 function fscanf($handle, $format);
85 function fpassthru($handle);
87 function fwrite($handle, $data, $length = 0);
89 function fputs($handle, $data, $length = 0);
91 function fprintf($handle, $format, ...);
93 function vfprintf($handle, $format, $args);
95 function fflush($handle);
97 function ftruncate($handle, $size);
99 function flock($handle, $operation, &$wouldblock = null);
101 function fputcsv($handle, $fields, $delimiter = ",", $enclosure = "\"", $escape_char = "\\");
103 function fgetcsv($handle, $length = 0, $delimiter = ",", $enclosure = "\"", $escape_char = "\\");
105 function file_get_contents($filename, $use_include_path = false, $context = null, $offset = 0, $maxlen = 0);
107 function file_put_contents($filename, $data, $flags = 0, $context = null);
109 function file($filename, $flags = 0, $context = null);
111 function readfile($filename, $use_include_path = false, $context = null);
113 function move_uploaded_file($filename, $destination);
115 function parse_ini_file($filename, $process_sections = false, $scanner_mode = INI_SCANNER_NORMAL);
117 function parse_ini_string($ini, $process_sections = false, $scanner_mode = INI_SCANNER_NORMAL);
119 function md5_file($filename, $raw_output = false);
121 function sha1_file($filename, $raw_output = false);
123 function chmod($filename, $mode);
125 function chown($filename, $user);
127 function lchown($filename, $user);
129 function chgrp($filename, $group);
131 function lchgrp($filename, $group);
133 function touch($filename, $mtime = 0, $atime = 0);
135 function copy($source, $dest, $context = null);
137 function rename($oldname, $newname, $context = null);
139 function umask($mask = null);
141 function unlink($filename, $context = null);
143 function link($target, $link);
145 function symlink($target, $link);
146 <<__PHPStdLib, __Rx>>
147 function basename($path, $suffix = null);
149 function fnmatch($pattern, $filename, $flags = 0);
151 function glob($pattern, $flags = 0);
153 function tempnam($dir, $prefix);
157 function fileperms($filename);
159 function fileinode($filename);
161 function filesize(?Stringish $filename);
163 function fileowner($filename);
165 function filegroup($filename);
167 function fileatime($filename);
169 function filemtime($filename);
171 function filectime($filename);
173 function filetype($filename);
175 function linkinfo($filename);
177 function is_writable($filename);
179 function is_writeable($filename);
181 function is_readable($filename);
183 function is_executable($filename);
185 function is_file($filename);
187 function is_dir($filename);
189 function is_link($filename);
191 function is_uploaded_file($filename);
193 function file_exists($filename);
195 function stat($filename);
197 function lstat($filename);
199 function clearstatcache();
201 function readlink($path);
203 function realpath($path);
205 function pathinfo($path, $opt = 15);
207 function disk_free_space($directory);
209 function diskfreespace($directory);
211 function disk_total_space($directory);
213 function mkdir($pathname, $mode = 0777, $recursive = false, $context = null);
215 function rmdir($dirname, $context = null);
216 <<__PHPStdLib, __Rx>>
217 function dirname($path);
221 function chdir($directory);
223 function chroot($directory);
225 function dir($directory);
227 function opendir($path, $context = null);
229 function readdir($dir_handle);
231 function rewinddir($dir_handle);
233 function scandir($directory, $descending = false, $context = null);
235 function closedir($dir_handle);