Lines Matching refs:name

108         for (String name : mBasePath.list()) {
109 if (!name.startsWith(mPrefix)) continue;
111 if (name.endsWith(SUFFIX_BACKUP)) {
112 if (LOGD) Slog.d(TAG, "recovering " + name);
114 final File backupFile = new File(mBasePath, name);
116 mBasePath, name.substring(0, name.length() - SUFFIX_BACKUP.length()));
121 } else if (name.endsWith(SUFFIX_NO_BACKUP)) {
122 if (LOGD) Slog.d(TAG, "recovering " + name);
124 final File noBackupFile = new File(mBasePath, name);
126 mBasePath, name.substring(0, name.length() - SUFFIX_NO_BACKUP.length()));
140 for (String name : mBasePath.list()) {
141 if (info.parse(name)) {
143 new File(mBasePath, name).delete();
155 for (String name : mBasePath.list()) {
156 if (info.parse(name)) {
157 final ZipEntry entry = new ZipEntry(name);
160 final File file = new File(mBasePath, name);
219 for (String name : mBasePath.list()) {
220 if (!info.parse(name)) continue;
223 rewriteSingle(rewriter, name);
232 private void rewriteSingle(Rewriter rewriter, String name) throws IOException {
233 if (LOGD) Slog.d(TAG, "rewriting " + name);
235 final File file = new File(mBasePath, name);
248 backupFile = new File(mBasePath, name + SUFFIX_BACKUP);
265 backupFile = new File(mBasePath, name + SUFFIX_NO_BACKUP);
288 for (String name : mBasePath.list()) {
289 if (!info.parse(name)) continue;
293 if (LOGD) Slog.d(TAG, "reading matching " + name);
295 final File file = new File(mBasePath, name);
309 for (String name : mBasePath.list()) {
310 if (!info.parse(name)) continue;
315 oldestActiveName = name;
344 for (String name : baseFiles) {
345 if (!info.parse(name)) continue;
350 if (LOGD) Slog.d(TAG, "rotating " + name);
354 final File file = new File(mBasePath, name);
360 if (LOGD) Slog.d(TAG, "deleting " + name);
362 final File file = new File(mBasePath, name);
417 public boolean parse(String name) {
420 final int dotIndex = name.lastIndexOf('.');
421 final int dashIndex = name.lastIndexOf('-');
427 if (!prefix.equals(name.substring(0, dotIndex))) return false;
430 startMillis = Long.parseLong(name.substring(dotIndex + 1, dashIndex));
432 if (name.length() - dashIndex == 1) {
435 endMillis = Long.parseLong(name.substring(dashIndex + 1));
448 final StringBuilder name = new StringBuilder();
449 name.append(prefix).append('.').append(startMillis).append('-');
451 name.append(endMillis);
453 return name.toString();