protected function getPath(string $path) : array
{
if (empty($this->root_dir)) {
if (empty($path)) {
return [];
}
return \Airship\chunk($path, '/');
}
$split = \Airship\chunk($path, '/');
$base = \Airship\chunk($this->root_dir, '/');
foreach ($split as $piece) {
if (!empty($piece)) {
$base[] = $piece;
}
}
return $base;
}