APIdia Launch Partner
Top Fields Constructors Methods
java.io

pack-priv final Class UnixFileSystem

extends FileSystem
Class Inheritance
Imports
java.util.Properties, jdk.internal.util.StaticProperty

Field Summary

Modifier and TypeField and Description
private final char
private final char
private final String
Inherited from java.io.FileSystem:
ACCESS_EXECUTEACCESS_READACCESS_WRITEBA_DIRECTORYBA_EXISTSBA_HIDDENBA_REGULARSPACE_FREESPACE_TOTALSPACE_USABLE

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
private native String
public boolean
checkAccess(File f, int access)

Implements abstract java.io.FileSystem.checkAccess.

Check whether the file or directory denoted by the given abstract pathname may be accessed by this process.

private native boolean
checkAccess0(File f, int access)

public int
compare(File f1, File f2)

Implements abstract java.io.FileSystem.compare.

Compare two abstract pathnames lexicographically.

public boolean
createDirectory(File f)

Implements abstract java.io.FileSystem.createDirectory.

Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

private native boolean
public boolean
createFileExclusively(String path)

Implements abstract java.io.FileSystem.createFileExclusively.

Create a new empty file with the given pathname.

private native boolean
public boolean
delete(File f)

Implements abstract java.io.FileSystem.delete.

Delete the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

private native boolean
public String
fromURIPath(String path)

Implements abstract java.io.FileSystem.fromURIPath.

Post-process the given URI path string if necessary.

public int
getBooleanAttributes(File f)

Implements abstract java.io.FileSystem.getBooleanAttributes.

Return the simple boolean attributes for the file or directory denoted by the given abstract pathname, or zero if it does not exist or some other I/O error occurs.

private native int
public String
getDefaultParent()

Implements abstract java.io.FileSystem.getDefaultParent.

Return the parent pathname string to be used when the parent-directory argument in one of the two-argument File constructors is the empty pathname.

private File
public long
getLastModifiedTime(File f)

Implements abstract java.io.FileSystem.getLastModifiedTime.

Return the time at which the file or directory denoted by the given abstract pathname was last modified, or zero if it does not exist or some other I/O error occurs.

private native long
public long
getLength(File f)

Implements abstract java.io.FileSystem.getLength.

Return the length in bytes of the file denoted by the given abstract pathname, or zero if it does not exist, is a directory, or some other I/O error occurs.

private native long
public int
getNameMax(String path)

Implements abstract java.io.FileSystem.getNameMax.

Retrieve the maximum length of a component of a file path.

private native long
private String
public char
getPathSeparator()

Implements abstract java.io.FileSystem.getPathSeparator.

Return the local filesystem's path-separator character.

public char
getSeparator()

Implements abstract java.io.FileSystem.getSeparator.

Return the local filesystem's name-separator character.

public long
getSpace(File f, int t)

Implements abstract java.io.FileSystem.getSpace.

private native long
getSpace0(File f, int t)

public boolean
hasBooleanAttributes(File f, int attributes)

Overrides java.io.FileSystem.hasBooleanAttributes.

Checks if all the given boolean attributes are true for the file or directory denoted by the given abstract pathname.

public int
hashCode(File f)

Implements abstract java.io.FileSystem.hashCode.

Compute the hash code of an abstract pathname.

private static native void
public boolean
isAbsolute(File f)

Implements abstract java.io.FileSystem.isAbsolute.

Tell whether or not the given abstract pathname is absolute.

private static int
public boolean
isInvalid(File f)

Implements abstract java.io.FileSystem.isInvalid.

Tell whether the given abstract pathname is invalid.

public String[]
list(File f)

Implements abstract java.io.FileSystem.list.

List the elements of the directory denoted by the given abstract pathname.

private native String[]
public File[]
listRoots()

Implements abstract java.io.FileSystem.listRoots.

List the available filesystem roots.

private String
normalize(String pathname, int off)

Normalize the given pathname, starting at the given offset; everything before off is already normal, and there's at least one duplicate or trailing slash to be removed

public String
normalize(String pathname)

Implements abstract java.io.FileSystem.normalize.

Convert the given pathname string to normal form.

public int
prefixLength(String pathname)

Implements abstract java.io.FileSystem.prefixLength.

Compute the length of this pathname string's prefix.

public boolean
rename(File f1, File f2)

Implements abstract java.io.FileSystem.rename.

Rename the file or directory denoted by the first abstract pathname to the second abstract pathname, returning true if and only if the operation succeeds.

private native boolean
rename0(File f1, File f2)

public String
resolve(String parent, String child)

Implements abstract java.io.FileSystem.resolve.

Resolve the child pathname string against the parent.

public String
resolve(File f)

Implements abstract java.io.FileSystem.resolve.

Resolve the given abstract pathname into absolute form.

public boolean
setLastModifiedTime(File f, long time)

Implements abstract java.io.FileSystem.setLastModifiedTime.

Set the last-modified time of the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

private native boolean
setLastModifiedTime0(File f, long time)

public boolean
setPermission(File f, int access, boolean enable, boolean owneronly)

Implements abstract java.io.FileSystem.setPermission.

Set on or off the access permission (to owner only or to all) to the file or directory denoted by the given abstract pathname, based on the parameters enable, access and oweronly.

private native boolean
setPermission0(File f, int access, boolean enable, boolean owneronly)

public boolean
setReadOnly(File f)

Implements abstract java.io.FileSystem.setReadOnly.

Mark the file or directory denoted by the given abstract pathname as read-only, returning true if and only if the operation succeeds.

private native boolean
private static String
Inherited from java.io.FileSystem:
getCWD

Field Detail

colonback to summary
private final char colon
slashback to summary
private final char slash
userDirback to summary
private final String userDir

Constructor Detail

UnixFileSystemback to summary
pack-priv UnixFileSystem()

Method Detail

canonicalizeback to summary
public String canonicalize(String path) throws IOException

Implements abstract java.io.FileSystem.canonicalize.

Annotations
@Override
canonicalize0back to summary
private native String canonicalize0(String path) throws IOException
checkAccessback to summary
public boolean checkAccess(File f, int access)

Implements abstract java.io.FileSystem.checkAccess.

Doc from java.io.FileSystem.checkAccess.

Check whether the file or directory denoted by the given abstract pathname may be accessed by this process. The second argument specifies which access, ACCESS_READ, ACCESS_WRITE or ACCESS_EXECUTE, to check. Return false if access is denied or an I/O error occurs

Annotations
@Override
checkAccess0back to summary
private native boolean checkAccess0(File f, int access)
compareback to summary
public int compare(File f1, File f2)

Implements abstract java.io.FileSystem.compare.

Doc from java.io.FileSystem.compare.

Compare two abstract pathnames lexicographically.

Annotations
@Override
createDirectoryback to summary
public boolean createDirectory(File f)

Implements abstract java.io.FileSystem.createDirectory.

Doc from java.io.FileSystem.createDirectory.

Create a new directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

Annotations
@Override
createDirectory0back to summary
private native boolean createDirectory0(File f)
createFileExclusivelyback to summary
public boolean createFileExclusively(String path) throws IOException

Implements abstract java.io.FileSystem.createFileExclusively.

Doc from java.io.FileSystem.createFileExclusively.

Create a new empty file with the given pathname. Return true if the file was created and false if a file or directory with the given pathname already exists. Throw an IOException if an I/O error occurs.

Annotations
@Override
createFileExclusively0back to summary
private native boolean createFileExclusively0(String path) throws IOException
deleteback to summary
public boolean delete(File f)

Implements abstract java.io.FileSystem.delete.

Doc from java.io.FileSystem.delete.

Delete the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

Annotations
@Override
delete0back to summary
private native boolean delete0(File f)
fromURIPathback to summary
public String fromURIPath(String path)

Implements abstract java.io.FileSystem.fromURIPath.

Doc from java.io.FileSystem.fromURIPath.

Post-process the given URI path string if necessary. This is used on win32, e.g., to transform "/c:/foo" into "c:/foo". The path string still has slash separators; code in the File class will translate them after this method returns.

Annotations
@Override
getBooleanAttributesback to summary
public int getBooleanAttributes(File f)

Implements abstract java.io.FileSystem.getBooleanAttributes.

Doc from java.io.FileSystem.getBooleanAttributes.

Return the simple boolean attributes for the file or directory denoted by the given abstract pathname, or zero if it does not exist or some other I/O error occurs.

Annotations
@Override
getBooleanAttributes0back to summary
private native int getBooleanAttributes0(File f)
getDefaultParentback to summary
public String getDefaultParent()

Implements abstract java.io.FileSystem.getDefaultParent.

Doc from java.io.FileSystem.getDefaultParent.

Return the parent pathname string to be used when the parent-directory argument in one of the two-argument File constructors is the empty pathname.

Annotations
@Override
getFileForSysCallsback to summary
private File getFileForSysCalls(File file)
getLastModifiedTimeback to summary
public long getLastModifiedTime(File f)

Implements abstract java.io.FileSystem.getLastModifiedTime.

Doc from java.io.FileSystem.getLastModifiedTime.

Return the time at which the file or directory denoted by the given abstract pathname was last modified, or zero if it does not exist or some other I/O error occurs.

Annotations
@Override
getLastModifiedTime0back to summary
private native long getLastModifiedTime0(File f)
getLengthback to summary
public long getLength(File f)

Implements abstract java.io.FileSystem.getLength.

Doc from java.io.FileSystem.getLength.

Return the length in bytes of the file denoted by the given abstract pathname, or zero if it does not exist, is a directory, or some other I/O error occurs.

Annotations
@Override
getLength0back to summary
private native long getLength0(File f)
getNameMaxback to summary
public int getNameMax(String path)

Implements abstract java.io.FileSystem.getNameMax.

Doc from java.io.FileSystem.getNameMax.

Retrieve the maximum length of a component of a file path.

Annotations
@Override
getNameMax0back to summary
private native long getNameMax0(String path)
getPathForSysCallsback to summary
private String getPathForSysCalls(String path)
getPathSeparatorback to summary
public char getPathSeparator()

Implements abstract java.io.FileSystem.getPathSeparator.

Doc from java.io.FileSystem.getPathSeparator.

Return the local filesystem's path-separator character.

Annotations
@Override
getSeparatorback to summary
public char getSeparator()

Implements abstract java.io.FileSystem.getSeparator.

Doc from java.io.FileSystem.getSeparator.

Return the local filesystem's name-separator character.

Annotations
@Override
getSpaceback to summary
public long getSpace(File f, int t)

Implements abstract java.io.FileSystem.getSpace.

Annotations
@Override
getSpace0back to summary
private native long getSpace0(File f, int t)
hasBooleanAttributesback to summary
public boolean hasBooleanAttributes(File f, int attributes)

Overrides java.io.FileSystem.hasBooleanAttributes.

Doc from java.io.FileSystem.hasBooleanAttributes.

Checks if all the given boolean attributes are true for the file or directory denoted by the given abstract pathname. False if it does not exist or some other I/O error occurs.

Annotations
@Override
hashCodeback to summary
public int hashCode(File f)

Implements abstract java.io.FileSystem.hashCode.

Doc from java.io.FileSystem.hashCode.

Compute the hash code of an abstract pathname.

Annotations
@Override
initIDsback to summary
private static native void initIDs()
isAbsoluteback to summary
public boolean isAbsolute(File f)

Implements abstract java.io.FileSystem.isAbsolute.

Doc from java.io.FileSystem.isAbsolute.

Tell whether or not the given abstract pathname is absolute.

Annotations
@Override
isHiddenback to summary
private static int isHidden(File f)
isInvalidback to summary
public boolean isInvalid(File f)

Implements abstract java.io.FileSystem.isInvalid.

Doc from java.io.FileSystem.isInvalid.

Tell whether the given abstract pathname is invalid.

Annotations
@Override
listback to summary
public String[] list(File f)

Implements abstract java.io.FileSystem.list.

Doc from java.io.FileSystem.list.

List the elements of the directory denoted by the given abstract pathname. Return an array of strings naming the elements of the directory if successful; otherwise, return null.

Annotations
@Override
list0back to summary
private native String[] list0(File f)
listRootsback to summary
public File[] listRoots()

Implements abstract java.io.FileSystem.listRoots.

Doc from java.io.FileSystem.listRoots.

List the available filesystem roots.

Annotations
@Override
normalizeback to summary
private String normalize(String pathname, int off)

Normalize the given pathname, starting at the given offset; everything before off is already normal, and there's at least one duplicate or trailing slash to be removed

normalizeback to summary
public String normalize(String pathname)

Implements abstract java.io.FileSystem.normalize.

Doc from java.io.FileSystem.normalize.

Convert the given pathname string to normal form. If the string is already in normal form then it is simply returned.

Annotations
@Override
prefixLengthback to summary
public int prefixLength(String pathname)

Implements abstract java.io.FileSystem.prefixLength.

Doc from java.io.FileSystem.prefixLength.

Compute the length of this pathname string's prefix. The pathname string must be in normal form.

Annotations
@Override
renameback to summary
public boolean rename(File f1, File f2)

Implements abstract java.io.FileSystem.rename.

Doc from java.io.FileSystem.rename.

Rename the file or directory denoted by the first abstract pathname to the second abstract pathname, returning true if and only if the operation succeeds.

Annotations
@Override
rename0back to summary
private native boolean rename0(File f1, File f2)
resolveback to summary
public String resolve(String parent, String child)

Implements abstract java.io.FileSystem.resolve.

Doc from java.io.FileSystem.resolve.

Resolve the child pathname string against the parent. Both strings must be in normal form, and the result will be in normal form.

Annotations
@Override
resolveback to summary
public String resolve(File f)

Implements abstract java.io.FileSystem.resolve.

Doc from java.io.FileSystem.resolve.

Resolve the given abstract pathname into absolute form. Invoked by the getAbsolutePath and getCanonicalPath methods in the File class.

Annotations
@Override
setLastModifiedTimeback to summary
public boolean setLastModifiedTime(File f, long time)

Implements abstract java.io.FileSystem.setLastModifiedTime.

Doc from java.io.FileSystem.setLastModifiedTime.

Set the last-modified time of the file or directory denoted by the given abstract pathname, returning true if and only if the operation succeeds.

Annotations
@Override
setLastModifiedTime0back to summary
private native boolean setLastModifiedTime0(File f, long time)
setPermissionback to summary
public boolean setPermission(File f, int access, boolean enable, boolean owneronly)

Implements abstract java.io.FileSystem.setPermission.

Doc from java.io.FileSystem.setPermission.

Set on or off the access permission (to owner only or to all) to the file or directory denoted by the given abstract pathname, based on the parameters enable, access and oweronly.

Annotations
@Override
setPermission0back to summary
private native boolean setPermission0(File f, int access, boolean enable, boolean owneronly)
setReadOnlyback to summary
public boolean setReadOnly(File f)

Implements abstract java.io.FileSystem.setReadOnly.

Doc from java.io.FileSystem.setReadOnly.

Mark the file or directory denoted by the given abstract pathname as read-only, returning true if and only if the operation succeeds.

Annotations
@Override
setReadOnly0back to summary
private native boolean setReadOnly0(File f)
trimSeparatorback to summary
private static String trimSeparator(String s)