Code example for File

Methods: listFiles

0
        } 
        return result;
    } 
 
    public int count() { 
        File file = new File(path);
        File[] contents = file.listFiles();
        return contents.length;
    } 
 
    public long totalDataSize() { 
        long total = 0;
        File file = new File(path);
        File[] contents = file.listFiles();
        for (File attachment : contents) {
            total += attachment.length();
        } 
        return total;
    } 
 
    public int deleteBlobsExceptWithKeys(List<TDBlobKey> keysToKeep) {