n = FileUtils.toRealPath(name + suffix); String fileName = FileUtils.getName(n); if (fileName.length() < suffix.length() + 1) { throw DbException.get(ErrorCode.INVALID_DATABASE_NAME_1, name);
private void backupPageStore(ZipOutputStream out, String fileName, PageStore store) throws IOException { Database db = session.getDatabase(); fileName = FileUtils.getName(fileName); out.putNextEntry(new ZipEntry(fileName)); int pos = 0; try { store.setBackup(true); while (true) { pos = store.copyDirect(pos, out); if (pos < 0) { break; } int max = store.getPageCount(); db.setProgress(DatabaseEventListener.STATE_BACKUP_FILE, fileName, pos, max); } } finally { store.setBackup(false); } out.closeEntry(); }
for (String name : list) { if (name.endsWith(Constants.SUFFIX_DB_FILE)) { name = FileUtils.getName(name); String n = name.substring(0, name.indexOf('.')); int id;
name = FileUtils.getName(name); try (OutputStream zip = FileUtils.newOutputStream(fileName, false)) { ZipOutputStream out = new ZipOutputStream(zip);
try { String directory = FileUtils.getParent(databaseName); String name = FileUtils.getName(databaseName); DeleteDbFiles.execute(directory, name, true); } catch (Exception e) {
n = FileUtils.toRealPath(name + suffix); String fileName = FileUtils.getName(n); if (fileName.length() < suffix.length() + 1) { throw DbException.get(ErrorCode.INVALID_DATABASE_NAME_1, name);
n = FileUtils.toRealPath(name + suffix); String fileName = FileUtils.getName(n); if (fileName.length() < suffix.length() + 1) { throw DbException.get(ErrorCode.INVALID_DATABASE_NAME_1, name);
private void backupPageStore(ZipOutputStream out, String fileName, PageStore store) throws IOException { Database db = session.getDatabase(); fileName = FileUtils.getName(fileName); out.putNextEntry(new ZipEntry(fileName)); int pos = 0; try { store.setBackup(true); while (true) { pos = store.copyDirect(pos, out); if (pos < 0) { break; } int max = store.getPageCount(); db.setProgress(DatabaseEventListener.STATE_BACKUP_FILE, fileName, pos, max); } } finally { store.setBackup(false); } out.closeEntry(); }
private void backupPageStore(ZipOutputStream out, String fileName, PageStore store) throws IOException { Database db = session.getDatabase(); fileName = FileUtils.getName(fileName); out.putNextEntry(new ZipEntry(fileName)); int pos = 0; try { store.setBackup(true); while (true) { pos = store.copyDirect(pos, out); if (pos < 0) { break; } int max = store.getPageCount(); db.setProgress(DatabaseEventListener.STATE_BACKUP_FILE, fileName, pos, max); } } finally { store.setBackup(false); } out.closeEntry(); }
for (String name : list) { if (name.endsWith(Constants.SUFFIX_DB_FILE)) { name = FileUtils.getName(name); String n = name.substring(0, name.indexOf('.')); int id;
for (String name : list) { if (name.endsWith(Constants.SUFFIX_DB_FILE)) { name = FileUtils.getName(name); String n = name.substring(0, name.indexOf('.')); int id;
name = FileUtils.getName(name); OutputStream zip = FileUtils.newOutputStream(fileName, false); ZipOutputStream out = new ZipOutputStream(zip);
name = FileUtils.getName(name); OutputStream zip = FileUtils.newOutputStream(fileName, false); ZipOutputStream out = new ZipOutputStream(zip);
try { String directory = FileUtils.getParent(databaseName); String name = FileUtils.getName(databaseName); DeleteDbFiles.execute(directory, name, true); } catch (Exception e) {
try { String directory = FileUtils.getParent(databaseName); String name = FileUtils.getName(databaseName); DeleteDbFiles.execute(directory, name, true); } catch (Exception e) {