private function validatePath(string $path): bool
    {
        if (! $this->fileSystem->has($path)) {
            throw new FileNotFoundException(sprintf('The source file "%s" does not exist.', $path));
        }
        if ($this->fileSystem->get($path)->getType() === 'dir') {
            return false;
        }
        return true;
    }