1 | <?php |
||
11 | class Stencil_File_System { |
||
12 | /** |
||
13 | * Include a file from child or root theme |
||
14 | * |
||
15 | * @param string $file File to include. |
||
16 | * |
||
17 | * @return bool True if a file was found. |
||
18 | */ |
||
19 | public static function load( $file ) { |
||
42 | |||
43 | /** |
||
44 | * Get the paths available that might contain a subdirectory |
||
45 | * |
||
46 | * Depending on the theme being a child theme or not |
||
47 | * The child theme is being prepended to the paths list |
||
48 | * |
||
49 | * @param string $sub_directory Name of directory to test. |
||
50 | * |
||
51 | * @return array Root and optionally child path |
||
52 | */ |
||
53 | public static function get_potential_directories( $sub_directory ) { |
||
75 | |||
76 | /** |
||
77 | * Move a file or folder |
||
78 | * |
||
79 | * @param string $source Move this. |
||
80 | * @param string $destination To this. |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | public static function move( $source, $destination ) { |
||
89 | |||
90 | /** |
||
91 | * Remove directory |
||
92 | * |
||
93 | * @param string $directory Directory to remove. |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public static function remove( $directory ) { |
||
102 | } |
||
103 |