VirtualFile (@NotNull Project project, @NotNull final VirtualFile file, @NotNull final VirtualFile newParent, @NotNull final String newName) { try { return WriteCommandAction.writeCommandAction(project) .withName("VcsTestUtil CopyFileInCommand") //NON-NLS .compute(() -> file.copy(file, newParent, newName)); } catch (IOException e) { throw new RuntimeException(e); } }