Beispiel #1
0
  private String doDeleteFile(long fileId) throws IOException {
    if (isOpen(fileId)) truncateFile(fileId);

    final OFileClassic fileClassic = files.remove(fileId);

    String name = null;
    if (fileClassic != null) {
      name = fileClassic.getName();

      if (fileClassic.exists()) fileClassic.delete();
    }

    return name;
  }
Beispiel #2
0
 private void openFile(OFileClassic fileClassic) throws IOException {
   if (fileClassic.exists()) {
     if (!fileClassic.isOpen()) fileClassic.open();
   } else fileClassic.create(-1);
 }