HM\BackUpWordPress\Path::cleanup PHP Метод

cleanup() публичный Метод

Clean any temporary / incomplete backups from the backups directory
public cleanup ( )
    public function cleanup()
    {
        // Don't cleanup a custom path, who knows what other stuff is there
        if (Path::get_path() === $this->get_custom_path()) {
            return;
        }
        foreach (new CleanUpIterator(new \DirectoryIterator(Path::get_path())) as $file) {
            if ($file->isDot() || !$file->isReadable() || !$file->isFile()) {
                continue;
            }
            @unlink($file->getPathname());
        }
    }