public function isEmpty($files)
    {
        if (!$files instanceof \Traversable) {
            $files = new \ArrayObject(is_array($files) ? $files : array($files));
        }
        foreach ($files as $file) {
            if (!$this->exists($file)) {
                throw new FileNotFoundException(null, 0, null, $file);
            }
            if (is_file($file)) {
                $file_info = new \SplFileInfo($file);
                if ($file_info->getSize() !== 0) {
                    return false;
                }
            } elseif (is_dir($file)) {
                $finder = new Finder();
                $finder->in($file);
                $it = $finder->getIterator();
                $it->rewind();
                if ($it->valid()) {
                    return false;
                }
            } else {
                throw new IOException(
                    sprintf('File "%s" is not a directory or a regular file.', $file),
                    0,
                    null,
                    $file
                );
            }
        }

        return true;
    }