public class ExternalFileAttributesUtils extends Object
ZipCentralDirectoryFileEntry
.Modifier and Type | Class and Description |
---|---|
static class |
ExternalFileAttributesUtils.Permission
Mapping from the posix permissions to unix file modes.
|
Modifier and Type | Field and Description |
---|---|
static int |
MS_DOS_DIRECTORY |
static int |
MS_DOS_READONLY |
static int |
UNIX_DIRECTORY |
static int |
UNIX_READ_ONLY_EXECUTE_PERMISSIONS |
static int |
UNIX_READ_ONLY_PERMISSIONS |
static int |
UNIX_READ_WRITE_PERMISSIONS |
static int |
UNIX_REGULAR_FILE |
static int |
UNIX_SYMLINK |
Constructor and Description |
---|
ExternalFileAttributesUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
assignMsdosAttributes(int attributes,
int msDosFileAttributes)
Assign MS-DOS attributes on our attributes integer and return it.
|
static void |
assignToFile(File file,
int permissions)
Set the permissions on an output file.
|
static void |
assignToFile(File file,
int permissions,
boolean useJavaAttributes)
Set the permissions on an output file.
|
static int |
assignUnixAttributes(int attributes,
int unixFileAttributes)
Assign the unix portion of the external file attributes.
|
static int |
assignUnixFileAttributes(int attributes,
int unixFileAttributes)
Assign Unix attributes on our attributes integer and return it.
|
static int |
fromFile(File file)
Get the permissions flags from a file.
|
static int |
fromFile(File file,
boolean useJavaAttributes)
Get the permissions flags from a file using the Java permissions calls on
File . |
static String |
toString(int attributes)
Get the permissions flags from a file.
|
public static int UNIX_REGULAR_FILE
public static int UNIX_DIRECTORY
public static int UNIX_SYMLINK
public static int UNIX_READ_ONLY_PERMISSIONS
public static int UNIX_READ_WRITE_PERMISSIONS
public static int UNIX_READ_ONLY_EXECUTE_PERMISSIONS
public static int MS_DOS_READONLY
public static int MS_DOS_DIRECTORY
public static int fromFile(File file)
public static int fromFile(File file, boolean useJavaAttributes)
File
. This is exposed mostly
for testing purposes.public static void assignToFile(File file, int permissions)
public static void assignToFile(File file, int permissions, boolean useJavaAttributes)
public static int assignMsdosAttributes(int attributes, int msDosFileAttributes)
public static int assignUnixFileAttributes(int attributes, int unixFileAttributes)
public static int assignUnixAttributes(int attributes, int unixFileAttributes)
public static String toString(int attributes)
This documentation content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.