class FileSSHRecordStoreConnection implements SSHRecordStoreConnection {

    @Override
    public int deleteExpiredSSHCertRecords(int expiryTimeMins) {
        String[] fnames = rootDir.list();
        if (fnames == null) {
            return 0;
        }
        long currentTime = System.currentTimeMillis();
        int count = 0;
        for (String fname : fnames) {
            
            // if the modification timestamp is older than
            // specified number of minutes then we'll delete it
            
            File file = new File(rootDir, fname);
            if (notExpired(currentTime, file.lastModified(), expiryTimeMins)) {
                continue;
            }
            //noinspection ResultOfMethodCallIgnored
            file.delete();
            count += 1;
        }
        return count;
    }

    public  FileSSHRecordStoreConnection(File rootDir);

}