Overview

Namespaces

  • Deimos
    • Helper
      • Exceptions
      • Helpers
        • Arr
        • Str
      • Traits
  • PHP

Classes

  • Deimos\Helper\AbstractHelper
  • Deimos\Helper\Helper
  • Deimos\Helper\Helpers\Arr\Arr
  • Deimos\Helper\Helpers\Dir
  • Deimos\Helper\Helpers\File
  • Deimos\Helper\Helpers\Json
  • Deimos\Helper\Helpers\Math
  • Deimos\Helper\Helpers\Money
  • Deimos\Helper\Helpers\Str\Str

Interfaces

  • Deimos\Helper\InterfaceHelper
  • Throwable

Traits

  • Deimos\Helper\Helpers\Arr\KeyTrait
  • Deimos\Helper\Helpers\Arr\StackTrait
  • Deimos\Helper\Helpers\Str\DefaultTrait
  • Deimos\Helper\Traits\Helper

Exceptions

  • Deimos\Helper\Exceptions\ExceptionEmpty
  • Exception
  • InvalidArgumentException
  • LogicException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: namespace Deimos\Helper\Helpers;
 4: 
 5: use Deimos\Helper\AbstractHelper;
 6: 
 7: class File extends AbstractHelper
 8: {
 9: 
10:     /**
11:      * @param string $path
12:      *
13:      * @return bool
14:      */
15:     public function touch($path)
16:     {
17:         return touch($path);
18:     }
19: 
20:     /**
21:      * @param string $path
22:      *
23:      * @return bool
24:      */
25:     public function remove($path)
26:     {
27:         return unlink($path);
28:     }
29: 
30:     /**
31:      * @param string $path
32:      *
33:      * @return bool
34:      */
35:     public function exists($path)
36:     {
37:         return file_exists($path);
38:     }
39: 
40:     /**
41:      * @param string $path
42:      *
43:      * @return int
44:      */
45:     public function size($path)
46:     {
47:         return filesize($path);
48:     }
49: 
50:     /**
51:      * @param string $path
52:      *
53:      * @return bool
54:      */
55:     public function isReadable($path)
56:     {
57:         return is_readable($path);
58:     }
59: 
60:     /**
61:      * @param string $path
62:      *
63:      * @return bool
64:      */
65:     public function isFile($path)
66:     {
67:         return (is_file($path) && !$this->helper->dir()->isDir($path));
68:     }
69: 
70: }
71: 
API documentation generated by ApiGen