
org.osmdroid.mtp.util.FolderFileCounter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of osmdroid-packager Show documentation
Show all versions of osmdroid-packager Show documentation
A tool to package OpenStreetMap tiles
// Created by plusminus on 3:43:56 PM - Mar 6, 2009
package org.osmdroid.mtp.util;
import java.io.File;
public class FolderFileCounter {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
/**
* @return true
on success, false
otherwise.
*/
public static int getTotalRecursiveFileCount(final File pFolder){
final File[] children = pFolder.listFiles();
int tmpCnt = 0;
for(final File c : children){
if(c.isDirectory()){
tmpCnt += getTotalRecursiveFileCount(c);
}else{
tmpCnt++;
}
}
return tmpCnt;
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy