summaryrefslogtreecommitdiff
path: root/src/Filesystem/Create.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Filesystem/Create.php')
-rw-r--r--src/Filesystem/Create.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Filesystem/Create.php b/src/Filesystem/Create.php
deleted file mode 100644
index 45b09fd..0000000
--- a/src/Filesystem/Create.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace App\Filesystem;
-
-
-/**
- * Base class for creating filesystem things
- *
- * @author Phil Burton <phil@d3r.com>
- */
-abstract class Create
-{
- /**
- * Filename to create
- *
- * @var string
- * @author Phil Burton <phil@d3r.com>
- */
- protected $filename;
-
- /**
- * Thing we're creating, used for messages
- *
- * @var string
- * @author Phil Burton <phil@d3r.com>
- */
- protected $thing;
-
- /**
- * Set filename on object and check we can wirte to the Directory
- *
- * @param string $filename
- * @author Phil Burton <phil@d3r.com>
- */
- public function __construct(string $filename)
- {
- $this->filename = $filename;
-
- if (!is_writable(dirname($filename))) {
- throw new \Exception('Cannot create ' . $this->thing . ' at: ' . $filename);
- }
- }
-
- abstract public function excecute();
-}