| @@ 211-222 (lines=12) @@ | ||
| 208 | * @param integer $pri Priority |
|
| 209 | * @return resource|boolean |
|
| 210 | */ |
|
| 211 | public static function unlink($path, $cb = null, $pri = EIO_PRI_DEFAULT) |
|
| 212 | { |
|
| 213 | $cb = CallbackWrapper::forceWrap($cb); |
|
| 214 | if (!self::$supported) { |
|
| 215 | $r = unlink($path); |
|
| 216 | if ($cb) { |
|
| 217 | $cb($path, $r); |
|
| 218 | } |
|
| 219 | return $r; |
|
| 220 | } |
|
| 221 | return eio_unlink($path, $pri, $cb, $path); |
|
| 222 | } |
|
| 223 | ||
| 224 | /** |
|
| 225 | * Rename |
|
| @@ 363-374 (lines=12) @@ | ||
| 360 | * @param integer $pri Priority |
|
| 361 | * @return resource|boolean |
|
| 362 | */ |
|
| 363 | public static function rmdir($path, $cb = null, $pri = EIO_PRI_DEFAULT) |
|
| 364 | { |
|
| 365 | $cb = CallbackWrapper::forceWrap($cb); |
|
| 366 | if (!FileSystem::$supported) { |
|
| 367 | $r = rmdir($path); |
|
| 368 | if ($cb) { |
|
| 369 | $cb($path, $r); |
|
| 370 | } |
|
| 371 | return $r; |
|
| 372 | } |
|
| 373 | return eio_rmdir($path, $pri, $cb, $path); |
|
| 374 | } |
|
| 375 | ||
| 376 | /** |
|
| 377 | * Creates directory |
|
| @@ 405-416 (lines=12) @@ | ||
| 402 | * @param integer $pri = EIO_PRI_DEFAULT Priority |
|
| 403 | * @return resource|true |
|
| 404 | */ |
|
| 405 | public static function readdir($path, $cb = null, $flags = null, $pri = EIO_PRI_DEFAULT) |
|
| 406 | { |
|
| 407 | $cb = CallbackWrapper::forceWrap($cb); |
|
| 408 | if (!FileSystem::$supported) { |
|
| 409 | $r = glob($path); |
|
| 410 | if ($cb) { |
|
| 411 | $cb($path, $r); |
|
| 412 | } |
|
| 413 | return true; |
|
| 414 | } |
|
| 415 | return eio_readdir($path, $flags, $pri, $cb, $path); |
|
| 416 | } |
|
| 417 | ||
| 418 | /** |
|
| 419 | * Truncate file |
|