private @NotNull Entry doCreateFileEntry(@NotNull VirtualFile file, boolean forDeletion) {
    Pair<StoredContent, Long> contentAndStamps;
    if (forDeletion) {
      FileDocumentManager m = FileDocumentManager.getInstance();
      Document d = m.isFileModified(file) ? m.getCachedDocument(file) : null; // should not try to load document
      contentAndStamps = acquireAndClearCurrentContent(file, d);
    }
    else {
      contentAndStamps = getActualContentNoAcquire(file);
    }

    StoredContent content = contentAndStamps.first;
    Long timestamp = contentAndStamps.second;

    if (file instanceof VirtualFileSystemEntry) {
      return new FileEntry(((VirtualFileSystemEntry)file).getNameId(), content, timestamp, !file.isWritable());
    }
    return new FileEntry(file.getName(), content, timestamp, !file.isWritable());
  }
private @NotNull Entry doCreateFileEntry(@NotNull VirtualFile file, boolean forDeletion)