core/src/main/java/com/orientechnologies/common/io/OFileUtils.java
public static void atomicMoveWithFallback(Path source, Path target, Object requester) throws IOException {
    try {
      Files.move(source, target, StandardCopyOption.ATOMIC_MOVE);
    } catch (AtomicMoveNotSupportedException ignore) {
      OLogManager.instance()
          .warn(requester, "atomic file move is not possible, falling back to regular move (moving '%s' to '%s')", source, target);
      Files.move(source, target);
    }
  }
public static void atomicMoveWithFallback(Path source, Path target, Object requester) throws IOException {
    try {
      Files.move(source, target, StandardCopyOption.ATOMIC_MOVE);
    } catch (AtomicMoveNotSupportedException ignore) {
      OLogManager.instance()
          .warn(requester, "atomic file move is not possible, falling back to regular move (moving '%s' to '%s')", source, target);
      Files.move(source, target);
    }
  }
Tries to move a file from the source to the target atomically. If atomic move is not possible, falls back to regular move.

@param source    the source to move the file from.
@param target    the target to move the file to.
@param requester the requester of the move being performed to produce user-friendly log messages.

@see Files#move(Path, Path, CopyOption...)
@see StandardCopyOption#ATOMIC_MOVE