File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function isFileAlreadyExist($filename)
4242 */
4343 public function createFile ($ filename , $ content )
4444 {
45- if (false === $ this ->createDirectory ($ filename )) {
45+ if (false === $ this ->createDirectory (dirname ( $ filename) )) {
4646 return false ;
4747 }
4848
@@ -60,7 +60,7 @@ public function createFile($filename, $content)
6060 */
6161 public function symlinkFile ($ sourceFile , $ file )
6262 {
63- if (false === $ this ->createDirectory ($ file )) {
63+ if (false === $ this ->createDirectory (dirname ( $ file) )) {
6464 return false ;
6565 }
6666
@@ -93,16 +93,14 @@ public function remove($file)
9393 }
9494
9595 /**
96- * @param string $filename
96+ * @param string $directory
9797 *
9898 * @return bool
9999 * @SuppressWarnings(PHPMD.StaticAccess)
100100 */
101- public function createDirectory ($ filename )
101+ public function createDirectory ($ directory )
102102 {
103- $ directory = dirname ($ filename );
104-
105- if (true === file_exists ($ directory )) {
103+ if (true === is_dir ($ directory )) {
106104 return true ;
107105 }
108106
You can’t perform that action at this time.
0 commit comments