File directory = tmp.getParentFile(); File[] files = directory.listFiles();
GeneralFile directory = tmp.getParentFile(); GeneralFile[] files = directory.listFiles();
    private synchronized static void deleteParents(File file)    {        if (file == null)        {            return;        }        File tmp = file;        for (int i = 0; i < directoryLevels; i++)        {            File directory = tmp.getParentFile();            File[] files = directory.listFiles();            // Only delete empty directories            if (files.length != 0)            {                break;            }            directory.delete();            tmp = directory;        }    }