xref: /PHP-8.2/ext/standard/tests/file/disk.phpt (revision c8093fe9)
1--TEST--
2disk_total_space() and disk_free_space() tests
3--INI--
4precision=14
5--SKIPIF--
6<?php
7if (substr(PHP_OS, 0, 3) == 'WIN') {
8    die('skip not for Windows');
9}
10?>
11--CONFLICTS--
12disk_total_space
13--FILE--
14<?php
15
16var_dump(disk_free_space(-1));
17var_dump(disk_total_space(-1));
18
19var_dump(disk_free_space("/"));
20var_dump(disk_total_space("/"));
21
22var_dump(disk_free_space("/some/path/here"));
23var_dump(disk_total_space("/some/path/here"));
24
25echo "Done\n";
26?>
27--EXPECTF--
28Warning: disk_free_space(): No such file or directory in %s on line %d
29bool(false)
30
31Warning: disk_total_space(): No such file or directory in %s on line %d
32bool(false)
33float(%f)
34float(%f)
35
36Warning: disk_free_space(): No such file or directory in %s on line %d
37bool(false)
38
39Warning: disk_total_space(): No such file or directory in %s on line %d
40bool(false)
41Done
42