This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /******************************************************************** |
||
3 | * Created by: Marko Kungla @ OkramLabs on Aug 6, 2012 - 9:58:05 |
||
4 | * Contact: [email protected] - https://okramlabs.com |
||
5 | * @copyright: 2015 OkramLabs - https://okramlabs.com |
||
6 | * @license MIT |
||
7 | * |
||
8 | * Package name:libhowi-filesystem |
||
9 | * @category HOWI3 |
||
10 | * @package libhowi |
||
11 | * @subpackage filesystem |
||
12 | * |
||
13 | * Lang: PHP |
||
14 | * Encoding: UTF-8 |
||
15 | * File: FilesystemInterface.inc |
||
16 | * @link https:// |
||
17 | ******************************************************************** |
||
18 | * Contributors: |
||
19 | * @author Marko Kungla <[email protected]> |
||
20 | * Github: https://github.com/mkungla |
||
21 | ******************************************************************** |
||
22 | * Comments: |
||
23 | */ |
||
24 | namespace HOWI3\libhowi\Filesystem\Commons; |
||
25 | |||
26 | interface FilesystemInterface |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * Construct with or without current working directory |
||
31 | * |
||
32 | * @param string $setCwd |
||
33 | */ |
||
34 | public function __construct($setCwd = false); |
||
35 | |||
36 | /** |
||
37 | * Creates Directory object with basename |
||
38 | * |
||
39 | * @param string $directory |
||
40 | * @param string $dirname |
||
41 | * @param bool $recursive |
||
42 | * @param int $mode |
||
43 | * @param resource $context |
||
44 | * |
||
45 | * @return object DirectoryPlaceholderObject | DirectoryTreeObject |
||
46 | */ |
||
47 | public function dir($directory = false, $dirname = false, $recursive = true, $mode = false, $context = false); |
||
48 | |||
49 | /** |
||
50 | * Creates FileObject object with basename |
||
51 | * |
||
52 | * @param string $filename |
||
53 | * @param string $dirname |
||
54 | * @param mixed $data |
||
55 | * @param int $flags |
||
56 | * @param resource $context |
||
57 | */ |
||
58 | public function file($filename = false, $dirname = false, $data = '', $flags = 0, $context = null); |
||
59 | |||
60 | /** |
||
61 | * Creates InfoObject object |
||
62 | * |
||
63 | * @param string $basename |
||
64 | * @param string $directory |
||
65 | */ |
||
66 | public function infoObject($basename = false, $directory = false); |
||
67 | |||
68 | /** |
||
69 | * Creates TmpObject object with keyword |
||
70 | * |
||
71 | * @param string $keyword |
||
72 | */ |
||
73 | public function tmp($keyword = 'tmp'); |
||
74 | |||
75 | /** |
||
76 | * Creates LinkObject object with keyword |
||
77 | * |
||
78 | * @param string $keyword |
||
79 | */ |
||
80 | public function link($keyword = 'link'); |
||
81 | |||
82 | /** |
||
83 | * Change current working directory. |
||
84 | * |
||
85 | * Rreturn true if chnging working dir is success. |
||
86 | * Returns false if directory does not exist or can not be read |
||
87 | * |
||
88 | * @param string $path |
||
89 | * @param string $validate_dir_name |
||
90 | * base name of the directory |
||
91 | * useful when navigating ../../ and you want to make sure |
||
92 | * you are on directore named "$validate_dir_name" |
||
93 | * |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function cd($path = false, $validate_dir_name = false); |
||
97 | |||
98 | /** |
||
99 | * Delete remove directories or files |
||
100 | * |
||
101 | * When shred is true then files will be destroyed by shred command before remove |
||
102 | * |
||
103 | * @param unknown $pathname |
||
104 | * @param string $shred |
||
105 | */ |
||
106 | public function rm($pathname, $shred = false); |
||
107 | |||
108 | /** |
||
109 | * List files and directories inside the specified path |
||
110 | * |
||
111 | * @param string $path |
||
112 | * @return array |
||
113 | */ |
||
114 | public function scandir($path = false); |
||
115 | |||
116 | /** |
||
117 | * Gives information about a file or directory |
||
118 | * |
||
119 | * @param string $filename |
||
120 | * @return array |
||
121 | */ |
||
122 | public function stat($filename = false); |
||
123 | |||
124 | /** |
||
125 | * getDiskTotalSpace |
||
126 | * |
||
127 | * Given a string containing a directory, this function will return the total |
||
128 | * number of bytes on the corresponding filesystem or disk partition. |
||
129 | * |
||
130 | * @param string $partition_location |
||
131 | * @param string $convert |
||
132 | * @return number of bytes or formated output if $convert is not false |
||
133 | */ |
||
134 | public function getDiskTotalSpace($partition_location = false, $convert = false); |
||
135 | |||
136 | /** |
||
137 | * * Given a string containing a directory, this function will return the number |
||
138 | * of bytes available on the corresponding filesystem or disk partition. |
||
139 | * |
||
140 | * @param string $partition_location |
||
141 | * @param string $convert |
||
142 | * @return number of bytes or formated output if $convert is not false |
||
143 | */ |
||
144 | public function getDiskFreeSpace($partition_location = false, $convert = false); |
||
145 | |||
146 | /** |
||
147 | * Attempts to change the group of the file filename to group. |
||
148 | * |
||
149 | * @param string $filename |
||
150 | * @param string $group |
||
151 | * @return bool |
||
152 | */ |
||
153 | public function chgrp($filename = false, $group = false); |
||
154 | |||
155 | /** |
||
156 | * Attempts to change the mode of the specified file to that given in mode. |
||
157 | * |
||
158 | * @param string $filename |
||
159 | * @param string $mode |
||
160 | * @return bool |
||
161 | */ |
||
162 | public function chmod($filename = false, $mode = false); |
||
163 | |||
164 | /** |
||
165 | * Attempts to change the owner of the file filename to user user. |
||
166 | * Only the superuser may change the owner of a file. |
||
167 | * |
||
168 | * @param string $filename |
||
169 | * @param string $user |
||
170 | */ |
||
171 | public function chown($filename = false, $user = false); |
||
172 | |||
173 | /** |
||
174 | * clearstatcache — Clears file status cache |
||
175 | * When you use stat(), lstat(), or any of the other functions listed in the affected |
||
176 | * functions list (below), PHP caches the information those functions return in order to |
||
177 | * provide faster performance. |
||
178 | * However, in certain cases, you may want to clear the cached information |
||
179 | * for instance you write some file and whant to read any stats after you should run |
||
180 | * $FS->clearstatcache(false,$filename); |
||
181 | * |
||
182 | * @return void |
||
183 | */ |
||
184 | public function clearstatcache($clear_realpath_cache = false, $filename = false); |
||
185 | |||
186 | /** |
||
187 | * Copies file or directory with all the contents to new location |
||
188 | * bit similar as 'cp -R' |
||
189 | * Makes a copy of the file source to dest. |
||
190 | * |
||
191 | * @param string $source |
||
192 | * @param string $dest |
||
193 | * @param string $context |
||
194 | * @return bool |
||
195 | */ |
||
196 | public function copy($source = false, $dest = false, $context = false); |
||
197 | |||
198 | /** |
||
199 | * Renames (move) a file or entire directory |
||
200 | * |
||
201 | * @param string $oldname |
||
202 | * @param string $newname |
||
203 | * @param string $context |
||
204 | * @return bool |
||
205 | */ |
||
206 | public function mv($oldname = false, $newname = false, $context = false); |
||
207 | |||
208 | /** |
||
209 | * Match filename against a pattern |
||
210 | * FNM_NOESCAPE Disable backslash escaping. |
||
211 | * FNM_PATHNAME Slash in string only matches slash in the given pattern. |
||
212 | * FNM_PERIOD Leading period in string must be exactly matched by period in the given pattern. |
||
213 | * FNM_CASEFOLD Caseless match. Part of the GNU extension. |
||
214 | * |
||
215 | * @param string $pattern |
||
216 | * @param string $string |
||
217 | * @param string $flags |
||
218 | * |
||
219 | * @return bool |
||
220 | */ |
||
221 | public function namePatternMatch($pattern = false, $string = false, $flags = false); |
||
222 | |||
223 | /** |
||
224 | * Find pathnames matching a pattern |
||
225 | * |
||
226 | * The getGlob() function searches for all the pathnames matching pattern |
||
227 | * according to the rules used by the libc glob() function, |
||
228 | * which is similar to the rules used by common shells. |
||
229 | * |
||
230 | * @param string $pattern |
||
231 | * @param number $flags |
||
232 | * @return array matching paths |
||
233 | */ |
||
234 | public function getGlob($pattern = false, $flags = 0); |
||
235 | |||
236 | /** |
||
237 | * Tells whether the file was uploaded via HTTP POST |
||
238 | * |
||
239 | * @param string $filename |
||
240 | * @return bool |
||
241 | */ |
||
242 | public function isUploadedFile($filename = false); |
||
243 | |||
244 | /** |
||
245 | * Get realpath cache entries |
||
246 | * |
||
247 | * @return array |
||
248 | */ |
||
249 | public function getRealpathCache(); |
||
250 | |||
251 | /** |
||
252 | * Get realpath cache size |
||
253 | * |
||
254 | * @return int |
||
255 | */ |
||
256 | public function getRealpathCacheSize(); |
||
257 | |||
258 | /** |
||
259 | * Closes DirectoryTreeObject or FileObjects for given basename |
||
260 | * |
||
261 | * While FileObjects are closed anyway automatically when FS gets destructed |
||
262 | * but you might close the file your self. For inctance when multithreading / tasking |
||
263 | * |
||
264 | * @param string $keyword |
||
0 ignored issues
–
show
|
|||
265 | * @return bool true|false |
||
266 | */ |
||
267 | public function close($keyword = false); |
||
268 | |||
269 | /** |
||
270 | * Sets access and modification time of the item |
||
271 | * |
||
272 | * @param string $filename |
||
273 | * @param string $time |
||
274 | * @param string $atime |
||
275 | * @return bool |
||
276 | */ |
||
277 | public function touch($filename = false, $time = false, $atime = false); |
||
278 | |||
279 | /** |
||
280 | * Returns all loaded directory keys |
||
281 | * |
||
282 | * @return array |
||
283 | */ |
||
284 | public function getDirKeys(); |
||
285 | |||
286 | /** |
||
287 | * Returns all loaded file keys |
||
288 | * |
||
289 | * @return array |
||
290 | */ |
||
291 | public function getFileKeys(); |
||
292 | |||
293 | /** |
||
294 | * Create a directory and file structure from custom array or |
||
295 | * Make structure from DirectoryObject::lsTree output |
||
296 | * If there happens to be collision between array so dir or file already exists |
||
297 | * then it will be simply skipped. Directory must be a key and always habe array as value |
||
298 | * even when directory is empty. Files have to have key regular int and value "string" |
||
299 | * filename |
||
300 | * |
||
301 | * @param string $rootpath atleast rootpath parent directory must exist! |
||
302 | * @param array $data_array |
||
303 | * @return bool true on success fase on failure |
||
304 | */ |
||
305 | public function createStructure($rootpath,$data_array); |
||
306 | } |
||
307 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.