Calculates the database size. @param file current file @return file length
(final IOFile file)
| 214 | * @return file length |
| 215 | */ |
| 216 | private static long dbSize(final IOFile file) { |
| 217 | long s = 0; |
| 218 | if(file.isDir()) { |
| 219 | for(final IOFile f : file.children()) s += dbSize(f); |
| 220 | } else { |
| 221 | s += file.length(); |
| 222 | } |
| 223 | return s; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * Creates a database file. |