public function rm(string $fileOrDirectory, array $options = []): SystemService
    {
        $options = array_replace(
            [
                'force'                 => false,
                'recursive'             => false,
                'context'               => null,
                'skipIfAlreadyRemoved'  => true
            ],
            $options
        );

        if (!file_exists($fileOrDirectory) && $options['skipIfAlreadyRemoved']) {
            return $this;
        }

        $args = [
            $fileOrDirectory
        ];

        if ($options['context'] !== null) {
            $args[] = $options['context'];
        }

        if (is_dir($fileOrDirectory) && !is_link($fileOrDirectory)) {
            if (!$options['force']) {
                throw CantRemoveDirectoryException::create(
                    '"' . $fileOrDirectory . '" is a directory. If you really want to remove it, ' .
                    'set the "force" option to "true".'
                );
            }

            if ($options['recursive']) {
                $elements = $this->scandir(
                    $fileOrDirectory,
                    [
                        'recursive'         => true,
                        'context'           => $options['context'],
                        'skipDots'          => true,
                        'skipSymlinks'      => true
                    ]
                );

                foreach ($elements as $e) {
                    $this->rm($e, $options);
                }
            }

            if (!@rmdir(...$args)) {
                throw IOException::create(
                    'Couldn\'t remove directory "'.$fileOrDirectory.'". Last PHP Error: '.
                    print_r($this->getLastPhpError(), true)
                );
            }
        } else if (!@unlink(...$args)) {
            throw IOException::create(
                'Couldn\'t remove file or symlink "'.$fileOrDirectory.'". Last PHP Error: '.
                print_r($this->getLastPhpError(), true)
            );
        }

        return $this;
    }