
com.crabshue.commons.validations.file.annotations.AccessMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-validations Show documentation
Show all versions of commons-validations Show documentation
Library for annotation-based validations.
The newest version!
package com.crabshue.commons.validations.file.annotations;
import java.io.File;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum AccessMode implements AccessModeValidator {
READ("read mode") {
@Override
public Boolean canAccessInMode(File file) {
return file.canRead();
}
},
WRITE("write mode") {
@Override
public Boolean canAccessInMode(File file) {
return file.canWrite();
}
},
EXEC("execute mode") {
@Override
public Boolean canAccessInMode(File file) {
return file.canExecute();
}
};
private String accessMode;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy