summaryrefslogtreecommitdiff
path: root/src/Support/HasPermissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Support/HasPermissions.php')
-rw-r--r--src/Support/HasPermissions.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Support/HasPermissions.php b/src/Support/HasPermissions.php
new file mode 100644
index 0000000..c42d71d
--- /dev/null
+++ b/src/Support/HasPermissions.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace PHPIAC\Modules\Support;
+
+trait HasPermissions
+{
+ protected string $owner = '';
+ protected string $group = '';
+ protected int $mode = 0;
+
+ public function getPermissions($path): string
+ {
+ return new Permissions($path, $this->owner, $this->group, $this->mode);
+ }
+}