1: <?php
2:
3: namespace Deimos\Flow\Traits;
4:
5: trait FileSystem
6: {
7:
8: /**
9: * @param $path
10: *
11: * @return string
12: *
13: * @throws \InvalidArgumentException
14: */
15: public function createDirectory($path)
16: {
17: if (!@mkdir($path, 0777, true) && !is_dir($path))
18: {
19: throw new \InvalidArgumentException($path);
20: }
21:
22: return realpath($path) . '/';
23: }
24:
25: }