public enum EFileIOErrorCode extends Enum<EFileIOErrorCode> implements ISuccessIndicator
| Enum Constant and Description |
|---|
NO_ERROR
Generic error code: no error.
|
OBJECT_CANNOT_BE_HANDLED
We stumble across an object that is neither a file nor a directory.
|
OBJECT_HAS_NO_PARENT
An object's parent could not be retrieved.
|
OPERATION_FAILED
Generic error code: operation failed but we don't know why.
|
SECURITY_ERROR
Generic error code: a SecurityException occurred.
|
SOURCE_DOES_NOT_EXIST
A source file or directory does not exist.
|
SOURCE_EQUALS_TARGET
Source and destination object are identical.
|
SOURCE_NOT_READABLE
The source object cannot be read.
|
SOURCE_PARENT_NOT_WRITABLE
The source parent object is read-only (not writable).
|
TARGET_ALREADY_EXISTS
A destination file or directory already exists.
|
TARGET_IS_CHILD_OF_SOURCE
Avoid recursive dependencies.
|
TARGET_PARENT_NOT_WRITABLE
The target parent object is read-only (not writable).
|
| Modifier and Type | Method and Description |
|---|---|
FileIOError |
getAsIOError(EFileIOOperation eOperation,
File aFile) |
FileIOError |
getAsIOError(EFileIOOperation eOperation,
File aFile1,
File aFile2) |
static FileIOError |
getAsIOError(EFileIOOperation eOperation,
SecurityException ex)
Static method to create a
FileIOError for a
SecurityException. |
boolean |
isFailure() |
boolean |
isSuccess() |
static EFileIOErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EFileIOErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EFileIOErrorCode NO_ERROR
public static final EFileIOErrorCode OPERATION_FAILED
public static final EFileIOErrorCode SECURITY_ERROR
public static final EFileIOErrorCode SOURCE_DOES_NOT_EXIST
public static final EFileIOErrorCode TARGET_ALREADY_EXISTS
public static final EFileIOErrorCode SOURCE_EQUALS_TARGET
public static final EFileIOErrorCode TARGET_IS_CHILD_OF_SOURCE
public static final EFileIOErrorCode OBJECT_CANNOT_BE_HANDLED
public static final EFileIOErrorCode OBJECT_HAS_NO_PARENT
public static final EFileIOErrorCode SOURCE_NOT_READABLE
public static final EFileIOErrorCode SOURCE_PARENT_NOT_WRITABLE
public static final EFileIOErrorCode TARGET_PARENT_NOT_WRITABLE
public static EFileIOErrorCode[] values()
for (EFileIOErrorCode c : EFileIOErrorCode.values()) System.out.println(c);
public static EFileIOErrorCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is null@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull File aFile)
@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull File aFile1, @Nonnull File aFile2)
public boolean isSuccess()
isSuccess in interface ISuccessIndicatortrue if this is NO_ERROR , false
otherwise.public boolean isFailure()
isFailure in interface ISuccessIndicatortrue if this is any other value than NO_ERROR
, false otherwise.@Nonnull public static FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull SecurityException ex)
FileIOError for a
SecurityException.eOperation - The performed operation. May not be null.ex - The occurred SecurityException. Never null.null FileIOError.Copyright © 2006–2015 phloc systems. All rights reserved.