WindowsFileCopy.java revision 2362
47f59a32a741e47285e7a5795babe50e1e0571e9Phil Ostler * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
0e950ee415e9d813602434070f4bc2098f4b2d36Phil Ostler * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
class WindowsFileCopy {
private WindowsFileCopy() {
throws IOException
boolean replaceExisting = false;
boolean copyAttributes = false;
boolean followLinks = true;
boolean interruptible = false;
replaceExisting = true;
followLinks = false;
copyAttributes = true;
interruptible = true;
throw new NullPointerException();
} catch (WindowsException x) {
} catch (WindowsException x) {
if (!replaceExisting) {
throw new FileAlreadyExistsException(
} catch (WindowsException x) {
} catch (WindowsException x) {
throw new FileAlreadyExistsException(
final int flags =
if (interruptible) {
public int cancelValue() {
} catch (WindowsException x) {
} catch (ExecutionException e) {
if (t instanceof IOException)
throw (IOException)t;
throw new IOException(t);
} catch (WindowsException x) {
if (copyAttributes) {
} catch (IOException x) {
flags);
} catch (WindowsException x) {
if (copyAttributes) {
// copy DOS/timestamps attributes
} catch (IOException x) {
throws IOException
boolean atomicMove = false;
boolean replaceExisting = false;
atomicMove = true;
replaceExisting = true;
if (atomicMove) {
} catch (WindowsException x) {
throw new AtomicMoveNotSupportedException(
x.errorString());
} catch (WindowsException x) {
} catch (WindowsException x) {
if (!replaceExisting) {
throw new FileAlreadyExistsException(
} catch (WindowsException x) {
} catch (WindowsException x) {
throw new FileAlreadyExistsException(
} catch (WindowsException x) {
} catch (WindowsException x) {
} catch (IOException x) {
} catch (WindowsException x) {
// copy timestamps/DOS attributes
} catch (IOException x) {
} catch (WindowsException x) {
throw new DirectoryNotEmptyException(
} catch (WindowsException x) {
return null;
boolean followLinks)
throws IOException
} catch (WindowsException x) {
return path;