/** * Sets or unsets whether this ResourceAttributes object is marked archive. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_ARCHIVE}.</p> * * @param archive <code>true</code> to set it to be archive, * <code>false</code> to unset * @see #isArchive() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_ARCHIVE */ public void setArchive(boolean archive) { set(EFS.ATTRIBUTE_ARCHIVE, archive); }
/** * Converts an IFileInfo object into a ResourceAttributes object. * @param fileInfo The file info * @return The resource attributes */ public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) { ResourceAttributes attributes = new ResourceAttributes(); attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)); attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE)); attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE)); attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN)); attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK)); attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ)); attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE)); attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE)); attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ)); attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE)); attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE)); return attributes; }
/** * Converts an IFileInfo object into a ResourceAttributes object. * @param fileInfo The file info * @return The resource attributes */ public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) { ResourceAttributes attributes = new ResourceAttributes(); attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)); attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE)); attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE)); attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN)); attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK)); attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ)); attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE)); attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE)); attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ)); attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE)); attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE)); return attributes; }
/** * Sets or unsets whether this ResourceAttributes object is marked archive. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_ARCHIVE}.</p> * * @param archive <code>true</code> to set it to be archive, * <code>false</code> to unset * @see #isArchive() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_ARCHIVE */ public void setArchive(boolean archive) { set(EFS.ATTRIBUTE_ARCHIVE, archive); }
/** * Converts an IFileInfo object into a ResourceAttributes object. * @param fileInfo The file info * @return The resource attributes */ public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) { ResourceAttributes attributes = new ResourceAttributes(); attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)); attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE)); attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE)); attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN)); attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK)); attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ)); attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE)); attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE)); attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ)); attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE)); attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE)); return attributes; }
/** * Sets or unsets whether this ResourceAttributes object is marked read only. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_READ_ONLY}.</p> * * @param readOnly <code>true</code> to set it to be marked read only, * <code>false</code> to unset * @see #isReadOnly() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_READ_ONLY */ public void setReadOnly(boolean readOnly) { set(EFS.ATTRIBUTE_READ_ONLY, readOnly); }
/** * Sets or unsets whether this ResourceAttributes object is marked read only. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_READ_ONLY}.</p> * * @param readOnly <code>true</code> to set it to be marked read only, * <code>false</code> to unset * @see #isReadOnly() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_READ_ONLY */ public void setReadOnly(boolean readOnly) { set(EFS.ATTRIBUTE_READ_ONLY, readOnly); }
/** * Sets or unsets whether this ResourceAttributes object is marked executable. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_EXECUTABLE}.</p> * * @param executable <code>true</code> to set it to be executable, * <code>false</code> to unset * @see #isExecutable() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_EXECUTABLE */ public void setExecutable(boolean executable) { set(EFS.ATTRIBUTE_EXECUTABLE, executable); }
/** * Sets or unsets whether this ResourceAttributes object is marked read only. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_READ_ONLY}.</p> * * @param readOnly <code>true</code> to set it to be marked read only, * <code>false</code> to unset * @see #isReadOnly() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_READ_ONLY */ public void setReadOnly(boolean readOnly) { set(EFS.ATTRIBUTE_READ_ONLY, readOnly); }
/** * Sets or unsets whether this ResourceAttributes object is marked executable. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_EXECUTABLE}.</p> * * @param executable <code>true</code> to set it to be executable, * <code>false</code> to unset * @see #isExecutable() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_EXECUTABLE */ public void setExecutable(boolean executable) { set(EFS.ATTRIBUTE_EXECUTABLE, executable); }
/** * Sets or unsets whether this ResourceAttributes object is marked as symbolic link. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_SYMLINK}.</p> * * @param symLink <code>true</code> to set it to be marked as symbolic link, * <code>false</code> to unset * @see #isSymbolicLink() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_SYMLINK * @since 3.4 */ public void setSymbolicLink(boolean symLink) { set(EFS.ATTRIBUTE_SYMLINK, symLink); }
/** * Sets or unsets whether this ResourceAttributes object is marked as symbolic link. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_SYMLINK}.</p> * * @param symLink <code>true</code> to set it to be marked as symbolic link, * <code>false</code> to unset * @see #isSymbolicLink() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_SYMLINK * @since 3.4 */ public void setSymbolicLink(boolean symLink) { set(EFS.ATTRIBUTE_SYMLINK, symLink); }
/** * Sets or unsets whether this ResourceAttributes object is marked executable. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_EXECUTABLE}.</p> * * @param executable <code>true</code> to set it to be executable, * <code>false</code> to unset * @see #isExecutable() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_EXECUTABLE */ public void setExecutable(boolean executable) { set(EFS.ATTRIBUTE_EXECUTABLE, executable); }
/** * Sets or unsets whether this ResourceAttributes object is marked hidden * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_HIDDEN}.</p> * * @param hidden <code>true</code> to set it to be marked hidden, * <code>false</code> to unset * @see #isHidden() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_HIDDEN * @since 3.2 */ public void setHidden(boolean hidden) { set(EFS.ATTRIBUTE_HIDDEN, hidden); }
/** * Sets or unsets whether this ResourceAttributes object is marked as symbolic link. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_SYMLINK}.</p> * * @param symLink <code>true</code> to set it to be marked as symbolic link, * <code>false</code> to unset * @see #isSymbolicLink() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_SYMLINK * @since 3.4 */ public void setSymbolicLink(boolean symLink) { set(EFS.ATTRIBUTE_SYMLINK, symLink); }
/** * Sets or unsets whether this ResourceAttributes object is marked archive. * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_ARCHIVE}.</p> * * @param archive <code>true</code> to set it to be archive, * <code>false</code> to unset * @see #isArchive() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_ARCHIVE */ public void setArchive(boolean archive) { set(EFS.ATTRIBUTE_ARCHIVE, archive); }
/** * Sets or unsets whether this ResourceAttributes object is marked hidden * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_HIDDEN}.</p> * * @param hidden <code>true</code> to set it to be marked hidden, * <code>false</code> to unset * @see #isHidden() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_HIDDEN * @since 3.2 */ public void setHidden(boolean hidden) { set(EFS.ATTRIBUTE_HIDDEN, hidden); }
/** * Sets or unsets whether this ResourceAttributes object is marked hidden * <p>This attribute is used only on file systems supporting {@link EFS#ATTRIBUTE_HIDDEN}.</p> * * @param hidden <code>true</code> to set it to be marked hidden, * <code>false</code> to unset * @see #isHidden() * @see IFileSystem#attributes() * @see EFS#ATTRIBUTE_HIDDEN * @since 3.2 */ public void setHidden(boolean hidden) { set(EFS.ATTRIBUTE_HIDDEN, hidden); }