Lines Matching refs:path
30 // relative bad path
39 //absolute bad path
69 foreach($paths as $path) {
70 echo "--- testing $path ---\n";
72 if (is_dir($path) || is_file($path)) {
73 echo "FAILED: $path - exists\n";
76 $res = touch($path);
79 if (file_exists($path)) {
81 if (is_dir($path)) {
82 echo "FAILED: $path - unexpected directory\n";
85 echo "PASSED: $path - created\n";
86 unlink($path);
91 echo "FAILED: $path - touch returned true, nothing there\n";
96 if (file_exists($path)) {
98 echo "FAILED: $path - touch returned false, something there\n";
99 if (is_dir($path)) {
100 rmdir($path);
103 unlink($path);
112 foreach($paths as $path) {
114 $res = @mkdir($path);
116 test_path($path);
117 rmdir($path);
121 $h = @fopen($path,"w");
124 test_path($path);
125 unlink($path);
132 function test_path($path) {
133 echo "--- testing $path ---\n";
134 $org_atime = get_atime($path);
136 $res = touch($path,0,0);
137 $next_atime = get_atime($path);
139 echo "FAILED: $path - access time not changed\n";
142 echo "PASSED: $path - touched\n";
146 function get_atime($path) {
147 $temp = stat($path);