If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parents of the source file. files.update requests must use the addParents and removeParents parameters to modify the parents list.

Output only. The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive.


Download Dmg Files


Download Zip šŸ”„ https://shurll.com/2y4I4Z šŸ”„



Output only. The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.

Output only. The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it is not populated for Docs Editors or shortcut files.

Whether the content restriction can only be modified or removed by a user who owns the file. For files in shared drives, any user with organizer capabilities can modify or remove this content restriction.

Note: Your Chromebook supports third-party file systems that use DocumentsProvider APIs. If you download one of these Android files apps from the Play Store, it will appear on the left-hand side of your Files .

By default, your files are saved to your Downloads folder, a temporary folder on your Chromebook's hard drive. You can change where downloads are saved by default or select a specific folder for each download.

In most cases, the methods defined here will delegate to the associated file system provider to perform the file operations.Since:1.7Method SummaryAll Methods Static Methods Concrete Methods Modifier and TypeMethod and Descriptionstatic longcopy(InputStream in, Path target, CopyOption... options)Copies all bytes from an input stream to a file.static longcopy(Path source, OutputStream out)Copies all bytes from a file to an output stream.static Pathcopy(Path source, Path target, CopyOption... options)Copy a file to a target file.static PathcreateDirectories(Path dir, FileAttribute... attrs)Creates a directory by creating all nonexistent parent directories first.static PathcreateDirectory(Path dir, FileAttribute... attrs)Creates a new directory.static PathcreateFile(Path path, FileAttribute... attrs)Creates a new and empty file, failing if the file already exists.static PathcreateLink(Path link, Path existing)Creates a new link (directory entry) for an existing file (optional operation).static PathcreateSymbolicLink(Path link, Path target, FileAttribute... attrs)Creates a symbolic link to a target (optional operation).static PathcreateTempDirectory(Path dir, String prefix, FileAttribute... attrs)Creates a new directory in the specified directory, using the given prefix to generate its name.static PathcreateTempDirectory(String prefix, FileAttribute... attrs)Creates a new directory in the default temporary-file directory, using the given prefix to generate its name.static PathcreateTempFile(Path dir, String prefix, String suffix, FileAttribute... attrs)Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.static PathcreateTempFile(String prefix, String suffix, FileAttribute... attrs)Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.static voiddelete(Path path)Deletes a file.static booleandeleteIfExists(Path path)Deletes a file if it exists.static booleanexists(Path path, LinkOption... options)Tests whether a file exists.static Streamfind(Path start, int maxDepth, BiPredicate matcher, FileVisitOption... options)Return a Stream that is lazily populated with Path by searching for files in a file tree rooted at a given starting file.static ObjectgetAttribute(Path path, String attribute, LinkOption... options)Reads the value of a file attribute.staticĀ 

VgetFileAttributeView(Path path, Class type, LinkOption... options)Returns a file attribute view of a given type.static FileStoregetFileStore(Path path)Returns the FileStore representing the file store where a file is located.static FileTimegetLastModifiedTime(Path path, LinkOption... options)Returns a file's last modified time.static UserPrincipalgetOwner(Path path, LinkOption... options)Returns the owner of a file.static SetgetPosixFilePermissions(Path path, LinkOption... options)Returns a file's POSIX file permissions.static booleanisDirectory(Path path, LinkOption... options)Tests whether a file is a directory.static booleanisExecutable(Path path)Tests whether a file is executable.static booleanisHidden(Path path)Tells whether or not a file is considered hidden.static booleanisReadable(Path path)Tests whether a file is readable.static booleanisRegularFile(Path path, LinkOption... options)Tests whether a file is a regular file with opaque content.static booleanisSameFile(Path path, Path path2)Tests if two paths locate the same file.static booleanisSymbolicLink(Path path)Tests whether a file is a symbolic link.static booleanisWritable(Path path)Tests whether a file is writable.static Streamlines(Path path)Read all lines from a file as a Stream.static Streamlines(Path path, Charset cs)Read all lines from a file as a Stream.static Streamlist(Path dir)Return a lazily populated Stream, the elements of which are the entries in the directory.static Pathmove(Path source, Path target, CopyOption... options)Move or rename a file to a target file.static BufferedReadernewBufferedReader(Path path)Opens a file for reading, returning a BufferedReader to read text from the file in an efficient manner.static BufferedReadernewBufferedReader(Path path, Charset cs)Opens a file for reading, returning a BufferedReader that may be used to read text from the file in an efficient manner.static BufferedWriternewBufferedWriter(Path path, Charset cs, OpenOption... options)Opens or creates a file for writing, returning a BufferedWriter that may be used to write text to the file in an efficient manner.static BufferedWriternewBufferedWriter(Path path, OpenOption... options)Opens or creates a file for writing, returning a BufferedWriter to write text to the file in an efficient manner.static SeekableByteChannelnewByteChannel(Path path, OpenOption... options)Opens or creates a file, returning a seekable byte channel to access the file.static SeekableByteChannelnewByteChannel(Path path, Set... attrs)Opens or creates a file, returning a seekable byte channel to access the file.static DirectoryStreamnewDirectoryStream(Path dir)Opens a directory, returning a DirectoryStream to iterate over all entries in the directory.static DirectoryStreamnewDirectoryStream(Path dir, DirectoryStream.Filter... attrs) throws IOExceptionOpens or creates a file, returning a seekable byte channel to access the file. The options parameter determines how the file is opened. The READ and WRITE options determine if the file should be opened for reading and/or writing. If neither option (or the APPEND option) is present then the file is opened for reading. By default reading or writing commence at the beginning of the file. In the addition to READ and WRITE, the following options may be present: Option Description APPEND If this option is present then the file is opened for writing and each invocation of the channel's write method first advances the position to the end of the file and then writes the requested data. Whether the advancement of the position and the writing of the data are done in a single atomic operation is system-dependent and therefore unspecified. This option may not be used in conjunction with the READ or TRUNCATE_EXISTING options. TRUNCATE_EXISTING If this option is present then the existing file is truncated to a size of 0 bytes. This option is ignored when the file is opened only for reading. CREATE_NEW If this option is present then a new file is created, failing if the file already exists or is a symbolic link. When creating a file the check for the existence of the file and the creation of the file if it does not exist is atomic with respect to other file system operations. This option is ignored when the file is opened only for reading. CREATE If this option is present then an existing file is opened if it exists, otherwise a new file is created. This option is ignored if the CREATE_NEW option is also present or the file is opened only for reading. DELETE_ON_CLOSE When this option is present then the implementation makes a best effort attempt to delete the file when closed by the close method. If the close method is not invoked then a best effort attempt is made to delete the file when the Java virtual machine terminates. SPARSE When creating a new file this option is a hint that the new file will be sparse. This option is ignored when not creating a new file. SYNC Requires that every update to the file's content or metadata be written synchronously to the underlying storage device. (see Synchronized I/O file integrity). DSYNC Requires that every update to the file's content be written synchronously to the underlying storage device. (see Synchronized I/O file integrity). An implementation may also support additional implementation specific options. The attrs parameter is optional file-attributes to set atomically when a new file is created. In the case of the default provider, the returned seekable byte channel is a FileChannel. Usage Examples: Path path = ... // open file for reading ReadableByteChannel rbc = Files.newByteChannel(path, EnumSet.of(READ))); // open file for writing to the end of an existing file, creating // the file if it doesn't already exist WritableByteChannel wbc = Files.newByteChannel(path, EnumSet.of(CREATE,APPEND)); // create file with initial permissions, opening it for both reading and writing FileAttribute perms = ... SeekableByteChannel sbc = Files.newByteChannel(path, EnumSet.of(CREATE_NEW,READ,WRITE), perms); Parameters:path - the path to the file to open or createoptions - options specifying how the file is openedattrs - an optional list of file attributes to set atomically when creating the fileReturns:a new seekable byte channelThrows:IllegalArgumentException - if the set contains an invalid combination of optionsUnsupportedOperationException - if an unsupported open option is specified or the array contains attributes that cannot be set atomically when creating the fileFileAlreadyExistsException - if a file of that name already exists and the CREATE_NEW option is specified (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the path if the file is opened for reading. The checkWrite method is invoked to check write access to the path if the file is opened for writing. The checkDelete method is invoked to check delete access if the file is opened with the DELETE_ON_CLOSE option.See Also:FileChannel.open(Path,Set,FileAttribute[])newByteChannelpublic static SeekableByteChannel newByteChannel(Path path, OpenOption... options) throws IOExceptionOpens or creates a file, returning a seekable byte channel to access the file. This method opens or creates a file in exactly the manner specified by the newByteChannel method.Parameters:path - the path to the file to open or createoptions - options specifying how the file is openedReturns:a new seekable byte channelThrows:IllegalArgumentException - if the set contains an invalid combination of optionsUnsupportedOperationException - if an unsupported open option is specifiedFileAlreadyExistsException - if a file of that name already exists and the CREATE_NEW option is specified (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the path if the file is opened for reading. The checkWrite method is invoked to check write access to the path if the file is opened for writing. The checkDelete method is invoked to check delete access if the file is opened with the DELETE_ON_CLOSE option.See Also:FileChannel.open(Path,OpenOption[])newDirectoryStreampublic static DirectoryStream newDirectoryStream(Path dir) throws IOExceptionOpens a directory, returning a DirectoryStream to iterate over all entries in the directory. The elements returned by the directory stream's iterator are of type Path, each one representing an entry in the directory. The Path objects are obtained as if by resolving the name of the directory entry against dir. When not using the try-with-resources construct, then directory stream's close method should be invoked after iteration is completed so as to free any resources held for the open directory. When an implementation supports operations on entries in the directory that execute in a race-free manner then the returned directory stream is a SecureDirectoryStream.Parameters:dir - the path to the directoryReturns:a new and open DirectoryStream objectThrows:NotDirectoryException - if the file could not otherwise be opened because it is not a directory (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the directory.newDirectoryStreampublic static DirectoryStream newDirectoryStream(Path dir, String glob) throws IOExceptionOpens a directory, returning a DirectoryStream to iterate over the entries in the directory. The elements returned by the directory stream's iterator are of type Path, each one representing an entry in the directory. The Path objects are obtained as if by resolving the name of the directory entry against dir. The entries returned by the iterator are filtered by matching the String representation of their file names against the given globbing pattern. For example, suppose we want to iterate over the files ending with ".java" in a directory: Path dir = ... try (DirectoryStream stream = Files.newDirectoryStream(dir, "*.java")) { : } The globbing pattern is specified by the getPathMatcher method. When not using the try-with-resources construct, then directory stream's close method should be invoked after iteration is completed so as to free any resources held for the open directory. When an implementation supports operations on entries in the directory that execute in a race-free manner then the returned directory stream is a SecureDirectoryStream.Parameters:dir - the path to the directoryglob - the glob patternReturns:a new and open DirectoryStream objectThrows:PatternSyntaxException - if the pattern is invalidNotDirectoryException - if the file could not otherwise be opened because it is not a directory (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the directory.newDirectoryStreampublic static DirectoryStream newDirectoryStream(Path dir, DirectoryStream.Filter... attrs) throws IOExceptionCreates a new and empty file, failing if the file already exists. The check for the existence of the file and the creation of the new file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the directory. The attrs parameter is optional file-attributes to set atomically when creating the file. Each attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored.Parameters:path - the path to the file to createattrs - an optional list of file attributes to set atomically when creating the fileReturns:the fileThrows:UnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the fileFileAlreadyExistsException - if a file of that name already exists (optional specific exception)IOException - if an I/O error occurs or the parent directory does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to the new file.createDirectorypublic static Path createDirectory(Path dir, FileAttribute... attrs) throws IOExceptionCreates a new directory. The check for the existence of the file and the creation of the directory if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the directory. The createDirectories method should be used where it is required to create all nonexistent parent directories first. The attrs parameter is optional file-attributes to set atomically when creating the directory. Each attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored.Parameters:dir - the directory to createattrs - an optional list of file attributes to set atomically when creating the directoryReturns:the directoryThrows:UnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryFileAlreadyExistsException - if a directory could not otherwise be created because a file of that name already exists (optional specific exception)IOException - if an I/O error occurs or the parent directory does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to the new directory.createDirectoriespublic static Path createDirectories(Path dir, FileAttribute... attrs) throws IOExceptionCreates a directory by creating all nonexistent parent directories first. Unlike the createDirectory method, an exception is not thrown if the directory could not be created because it already exists. The attrs parameter is optional file-attributes to set atomically when creating the nonexistent directories. Each file attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored. If this method fails, then it may do so after creating some, but not all, of the parent directories.Parameters:dir - the directory to createattrs - an optional list of file attributes to set atomically when creating the directoryReturns:the directoryThrows:UnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryFileAlreadyExistsException - if dir exists but is not a directory (optional specific exception)IOException - if an I/O error occursSecurityException - in the case of the default provider, and a security manager is installed, the checkWrite method is invoked prior to attempting to create a directory and its checkRead is invoked for each parent directory that is checked. If dir is not an absolute path then its toAbsolutePath may need to be invoked to get its absolute path. This may invoke the security manager's checkPropertyAccess method to check access to the system property user.dircreateTempFilepublic static Path createTempFile(Path dir, String prefix, String suffix, FileAttribute... attrs) throws IOExceptionCreates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. The resulting Path is associated with the same FileSystem as the given directory. The details as to how the name of the file is constructed is implementation dependent and therefore not specified. Where possible the prefix and suffix are used to construct candidate names in the same manner as the File.createTempFile(String,String,File) method. As with the File.createTempFile methods, this method is only part of a temporary-file facility. Where used as a work files, the resulting file may be opened using the DELETE_ON_CLOSE option so that the file is deleted when the appropriate close method is invoked. Alternatively, a shutdown-hook, or the File.deleteOnExit() mechanism may be used to delete the file automatically. The attrs parameter is optional file-attributes to set atomically when creating the file. Each attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored. When no file attributes are specified, then the resulting file may have more restrictive access permissions to files created by the File.createTempFile(String,String,File) method.Parameters:dir - the path to directory in which to create the fileprefix - the prefix string to be used in generating the file's name; may be nullsuffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is usedattrs - an optional list of file attributes to set atomically when creating the fileReturns:the path to the newly created file that did not exist before this method was invokedThrows:IllegalArgumentException - if the prefix or suffix parameters cannot be used to generate a candidate file nameUnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryIOException - if an I/O error occurs or dir does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to the file.createTempFilepublic static Path createTempFile(String prefix, String suffix, FileAttribute... attrs) throws IOExceptionCreates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. The resulting Path is associated with the default FileSystem. This method works in exactly the manner specified by the createTempFile(Path,String,String,FileAttribute[]) method for the case that the dir parameter is the temporary-file directory.Parameters:prefix - the prefix string to be used in generating the file's name; may be nullsuffix - the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is usedattrs - an optional list of file attributes to set atomically when creating the fileReturns:the path to the newly created file that did not exist before this method was invokedThrows:IllegalArgumentException - if the prefix or suffix parameters cannot be used to generate a candidate file nameUnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryIOException - if an I/O error occurs or the temporary-file directory does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to the file.createTempDirectorypublic static Path createTempDirectory(Path dir, String prefix, FileAttribute... attrs) throws IOExceptionCreates a new directory in the specified directory, using the given prefix to generate its name. The resulting Path is associated with the same FileSystem as the given directory. The details as to how the name of the directory is constructed is implementation dependent and therefore not specified. Where possible the prefix is used to construct candidate names. As with the createTempFile methods, this method is only part of a temporary-file facility. A shutdown-hook, or the File.deleteOnExit() mechanism may be used to delete the directory automatically. The attrs parameter is optional file-attributes to set atomically when creating the directory. Each attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored.Parameters:dir - the path to directory in which to create the directoryprefix - the prefix string to be used in generating the directory's name; may be nullattrs - an optional list of file attributes to set atomically when creating the directoryReturns:the path to the newly created directory that did not exist before this method was invokedThrows:IllegalArgumentException - if the prefix cannot be used to generate a candidate directory nameUnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryIOException - if an I/O error occurs or dir does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access when creating the directory.createTempDirectorypublic static Path createTempDirectory(String prefix, FileAttribute... attrs) throws IOExceptionCreates a new directory in the default temporary-file directory, using the given prefix to generate its name. The resulting Path is associated with the default FileSystem. This method works in exactly the manner specified by createTempDirectory(Path,String,FileAttribute[]) method for the case that the dir parameter is the temporary-file directory.Parameters:prefix - the prefix string to be used in generating the directory's name; may be nullattrs - an optional list of file attributes to set atomically when creating the directoryReturns:the path to the newly created directory that did not exist before this method was invokedThrows:IllegalArgumentException - if the prefix cannot be used to generate a candidate directory nameUnsupportedOperationException - if the array contains an attribute that cannot be set atomically when creating the directoryIOException - if an I/O error occurs or the temporary-file directory does not existSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access when creating the directory.createSymbolicLinkpublic static Path createSymbolicLink(Path link, Path target, FileAttribute... attrs) throws IOExceptionCreates a symbolic link to a target (optional operation). The target parameter is the target of the link. It may be an absolute or relative path and may not exist. When the target is a relative path then file system operations on the resulting link are relative to the path of the link. The attrs parameter is optional attributes to set atomically when creating the link. Each attribute is identified by its name. If more than one attribute of the same name is included in the array then all but the last occurrence is ignored. Where symbolic links are supported, but the underlying FileStore does not support symbolic links, then this may fail with an IOException. Additionally, some operating systems may require that the Java virtual machine be started with implementation specific privileges to create symbolic links, in which case this method may throw IOException.Parameters:link - the path of the symbolic link to createtarget - the target of the symbolic linkattrs - the array of attributes to set atomically when creating the symbolic linkReturns:the path to the symbolic linkThrows:UnsupportedOperationException - if the implementation does not support symbolic links or the array contains an attribute that cannot be set atomically when creating the symbolic linkFileAlreadyExistsException - if a file with the name already exists (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it denies LinkPermission("symbolic") or its checkWrite method denies write access to the path of the symbolic link.createLinkpublic static Path createLink(Path link, Path existing) throws IOExceptionCreates a new link (directory entry) for an existing file (optional operation). The link parameter locates the directory entry to create. The existing parameter is the path to an existing file. This method creates a new directory entry for the file so that it can be accessed using link as the path. On some file systems this is known as creating a "hard link". Whether the file attributes are maintained for the file or for each directory entry is file system specific and therefore not specified. Typically, a file system requires that all links (directory entries) for a file be on the same file system. Furthermore, on some platforms, the Java virtual machine may require to be started with implementation specific privileges to create hard links or to create links to directories.Parameters:link - the link (directory entry) to createexisting - a path to an existing fileReturns:the path to the link (directory entry)Throws:UnsupportedOperationException - if the implementation does not support adding an existing file to a directoryFileAlreadyExistsException - if the entry could not otherwise be created because a file of that name already exists (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it denies LinkPermission("hard") or its checkWrite method denies write access to either the link or the existing file.deletepublic static void delete(Path path) throws IOExceptionDeletes a file. An implementation may require to examine the file to determine if the file is a directory. Consequently this method may not be atomic with respect to other file system operations. If the file is a symbolic link then the symbolic link itself, not the final target of the link, is deleted. If the file is a directory then the directory must be empty. In some implementations a directory has entries for special files or links that are created when the directory is created. In such implementations a directory is considered empty when only the special entries exist. This method can be used with the walkFileTree method to delete a directory and all entries in the directory, or an entire file-tree where required. On some operating systems it may not be possible to remove a file when it is open and in use by this Java virtual machine or other programs.Parameters:path - the path to the file to deleteThrows:NoSuchFileException - if the file does not exist (optional specific exception)DirectoryNotEmptyException - if the file is a directory and could not otherwise be deleted because the directory is not empty (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the SecurityManager.checkDelete(String) method is invoked to check delete access to the filedeleteIfExistspublic static boolean deleteIfExists(Path path) throws IOExceptionDeletes a file if it exists. As with the delete(Path) method, an implementation may need to examine the file to determine if the file is a directory. Consequently this method may not be atomic with respect to other file system operations. If the file is a symbolic link, then the symbolic link itself, not the final target of the link, is deleted. If the file is a directory then the directory must be empty. In some implementations a directory has entries for special files or links that are created when the directory is created. In such implementations a directory is considered empty when only the special entries exist. On some operating systems it may not be possible to remove a file when it is open and in use by this Java virtual machine or other programs.Parameters:path - the path to the file to deleteReturns:true if the file was deleted by this method; false if the file could not be deleted because it did not existThrows:DirectoryNotEmptyException - if the file is a directory and could not otherwise be deleted because the directory is not empty (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the SecurityManager.checkDelete(String) method is invoked to check delete access to the file.copypublic static Path copy(Path source, Path target, CopyOption... options) throws IOExceptionCopy a file to a target file. This method copies a file to the target file with the options parameter specifying how the copy is performed. By default, the copy fails if the target file already exists or is a symbolic link, except if the source and target are the same file, in which case the method completes without copying the file. File attributes are not required to be copied to the target file. If symbolic links are supported, and the file is a symbolic link, then the final target of the link is copied. If the file is a directory then it creates an empty directory in the target location (entries in the directory are not copied). This method can be used with the walkFileTree method to copy a directory and all entries in the directory, or an entire file-tree where required. The options parameter may include any of the following: Option Description REPLACE_EXISTING If the target file exists, then the target file is replaced if it is not a non-empty directory. If the target file exists and is a symbolic link, then the symbolic link itself, not the target of the link, is replaced. COPY_ATTRIBUTES Attempts to copy the file attributes associated with this file to the target file. The exact file attributes that are copied is platform and file system dependent and therefore unspecified. Minimally, the last-modified-time is copied to the target file if supported by both the source and target file stores. Copying of file timestamps may result in precision loss. NOFOLLOW_LINKS Symbolic links are not followed. If the file is a symbolic link, then the symbolic link itself, not the target of the link, is copied. It is implementation specific if file attributes can be copied to the new link. In other words, the COPY_ATTRIBUTES option may be ignored when copying a symbolic link. An implementation of this interface may support additional implementation specific options. Copying a file is not an atomic operation. If an IOException is thrown, then it is possible that the target file is incomplete or some of its file attributes have not been copied from the source file. When the REPLACE_EXISTING option is specified and the target file exists, then the target file is replaced. The check for the existence of the file and the creation of the new file may not be atomic with respect to other file system activities. Usage Example: Suppose we want to copy a file into a directory, giving it the same file name as the source file: Path source = ... Path newdir = ... Files.copy(source, newdir.resolve(source.getFileName()); Parameters:source - the path to the file to copytarget - the path to the target file (may be associated with a different provider to the source path)options - options specifying how the copy should be doneReturns:the path to the target fileThrows:UnsupportedOperationException - if the array contains a copy option that is not supportedFileAlreadyExistsException - if the target file exists but cannot be replaced because the REPLACE_EXISTING option is not specified (optional specific exception)DirectoryNotEmptyException - the REPLACE_EXISTING option is specified but the file cannot be replaced because it is a non-empty directory (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the source file, the checkWrite is invoked to check write access to the target file. If a symbolic link is copied the security manager is invoked to check LinkPermission("symbolic").movepublic static Path move(Path source, Path target, CopyOption... options) throws IOExceptionMove or rename a file to a target file. By default, this method attempts to move the file to the target file, failing if the target file exists except if the source and target are the same file, in which case this method has no effect. If the file is a symbolic link then the symbolic link itself, not the target of the link, is moved. This method may be invoked to move an empty directory. In some implementations a directory has entries for special files or links that are created when the directory is created. In such implementations a directory is considered empty when only the special entries exist. When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. For example, renaming a directory on the same FileStore will usually not require moving the entries in the directory. When moving a directory requires that its entries be moved then this method fails (by throwing an IOException). To move a file tree may involve copying rather than moving directories and this can be done using the copy method in conjunction with the Files.walkFileTree utility method. The options parameter may include any of the following: Option Description REPLACE_EXISTING If the target file exists, then the target file is replaced if it is not a non-empty directory. If the target file exists and is a symbolic link, then the symbolic link itself, not the target of the link, is replaced. ATOMIC_MOVE The move is performed as an atomic file system operation and all other options are ignored. If the target file exists then it is implementation specific if the existing file is replaced or this method fails by throwing an IOException. If the move cannot be performed as an atomic file system operation then AtomicMoveNotSupportedException is thrown. This can arise, for example, when the target location is on a different FileStore and would require that the file be copied, or target location is associated with a different provider to this object. An implementation of this interface may support additional implementation specific options. Moving a file will copy the last-modified-time to the target file if supported by both source and target file stores. Copying of file timestamps may result in precision loss. An implementation may also attempt to copy other file attributes but is not required to fail if the file attributes cannot be copied. When the move is performed as a non-atomic operation, and an IOException is thrown, then the state of the files is not defined. The original file and the target file may both exist, the target file may be incomplete or some of its file attributes may not been copied from the original file. Usage Examples: Suppose we want to rename a file to "newname", keeping the file in the same directory: Path source = ... Files.move(source, source.resolveSibling("newname")); Alternatively, suppose we want to move a file to new directory, keeping the same file name, and replacing any existing file of that name in the directory: Path source = ... Path newdir = ... Files.move(source, newdir.resolve(source.getFileName()), REPLACE_EXISTING); Parameters:source - the path to the file to movetarget - the path to the target file (may be associated with a different provider to the source path)options - options specifying how the move should be doneReturns:the path to the target fileThrows:UnsupportedOperationException - if the array contains a copy option that is not supportedFileAlreadyExistsException - if the target file exists but cannot be replaced because the REPLACE_EXISTING option is not specified (optional specific exception)DirectoryNotEmptyException - the REPLACE_EXISTING option is specified but the file cannot be replaced because it is a non-empty directory (optional specific exception)AtomicMoveNotSupportedException - if the options array contains the ATOMIC_MOVE option but the file cannot be moved as an atomic file system operation.IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkWrite method is invoked to check write access to both the source and target file.readSymbolicLinkpublic static Path readSymbolicLink(Path link) throws IOExceptionReads the target of a symbolic link (optional operation). If the file system supports symbolic links then this method is used to read the target of the link, failing if the file is not a symbolic link. The target of the link need not exist. The returned Path object will be associated with the same file system as link.Parameters:link - the path to the symbolic linkReturns:a Path object representing the target of the linkThrows:UnsupportedOperationException - if the implementation does not support symbolic linksNotLinkException - if the target could otherwise not be read because the file is not a symbolic link (optional specific exception)IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it checks that FilePermission has been granted with the "readlink" action to read the link.getFileStorepublic static FileStore getFileStore(Path path) throws IOExceptionReturns the FileStore representing the file store where a file is located. Once a reference to the FileStore is obtained it is implementation specific if operations on the returned FileStore, or FileStoreAttributeView objects obtained from it, continue to depend on the existence of the file. In particular the behavior is not defined for the case that the file is deleted or moved to a different file store.Parameters:path - the path to the fileReturns:the file store where the file is storedThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the file, and in addition it checks RuntimePermission ("getFileStoreAttributes")isSameFilepublic static boolean isSameFile(Path path, Path path2) throws IOExceptionTests if two paths locate the same file. If both Path objects are equal then this method returns true without checking if the file exists. If the two Path objects are associated with different providers then this method returns false. Otherwise, this method checks if both Path objects locate the same file, and depending on the implementation, may require to open or access both files. If the file system and files remain static, then this method implements an equivalence relation for non-null Paths.Ā  It is reflexive: for Path f, isSameFile(f,f) should return true. It is symmetric: for two Paths f and g, isSameFile(f,g) will equal isSameFile(g,f). It is transitive: for three Paths f, g, and h, if isSameFile(f,g) returns true and isSameFile(g,h) returns true, then isSameFile(f,h) will return return true. Parameters:path - one path to the filepath2 - the other pathReturns:true if, and only if, the two paths locate the same fileThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to both files.See Also:BasicFileAttributes.fileKey()isHiddenpublic static boolean isHidden(Path path) throws IOExceptionTells whether or not a file is considered hidden. The exact definition of hidden is platform or provider dependent. On UNIX for example a file is considered to be hidden if its name begins with a period character ('.'). On Windows a file is considered hidden if it isn't a directory and the DOS hidden attribute is set. Depending on the implementation this method may require to access the file system to determine if the file is considered hidden.Parameters:path - the path to the file to testReturns:true if the file is considered hiddenThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, the checkRead method is invoked to check read access to the file.probeContentTypepublic static String probeContentType(Path path) throws IOExceptionProbes the content type of a file. This method uses the installed FileTypeDetector implementations to probe the given file to determine its content type. Each file type detector's probeContentType is invoked, in turn, to probe the file type. If the file is recognized then the content type is returned. If the file is not recognized by any of the installed file type detectors then a system-default file type detector is invoked to guess the content type. A given invocation of the Java virtual machine maintains a system-wide list of file type detectors. Installed file type detectors are loaded using the service-provider loading facility defined by the ServiceLoader class. Installed file type detectors are loaded using the system class loader. If the system class loader cannot be found then the extension class loader is used; If the extension class loader cannot be found then the bootstrap class loader is used. File type detectors are typically installed by placing them in a JAR file on the application class path or in the extension directory, the JAR file contains a provider-configuration file named java.nio.file.spi.FileTypeDetector in the resource directory META-INF/services, and the file lists one or more fully-qualified names of concrete subclass of FileTypeDetector that have a zero argument constructor. If the process of locating or instantiating the installed file type detectors fails then an unspecified error is thrown. The ordering that installed providers are located is implementation specific. The return value of this method is the string form of the value of a Multipurpose Internet Mail Extension (MIME) content type as defined by RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies. The string is guaranteed to be parsable according to the grammar in the RFC.Parameters:path - the path to the file to probeReturns:The content type of the file, or null if the content type cannot be determinedThrows:IOException - if an I/O error occursSecurityException - If a security manager is installed and it denies an unspecified permission required by a file type detector implementation.getFileAttributeViewpublic static V getFileAttributeView(Path path, Class type, LinkOption... options)Returns a file attribute view of a given type. A file attribute view provides a read-only or updatable view of a set of file attributes. This method is intended to be used where the file attribute view defines type-safe methods to read or update the file attributes. The type parameter is the type of the attribute view required and the method returns an instance of that type if supported. The BasicFileAttributeView type supports access to the basic attributes of a file. Invoking this method to select a file attribute view of that type will always return an instance of that class. The options array may be used to indicate how symbolic links are handled by the resulting file attribute view for the case that the file is a symbolic link. By default, symbolic links are followed. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. This option is ignored by implementations that do not support symbolic links. Usage Example: Suppose we want read or set a file's ACL, if supported: Path path = ... AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); if (view != null) { List acl = view.getAcl(); : } Type Parameters:V - The FileAttributeView typeParameters:path - the path to the filetype - the Class object corresponding to the file attribute viewoptions - options indicating how symbolic links are handledReturns:a file attribute view of the specified type, or null if the attribute view type is not availablereadAttributespublic static A readAttributes(Path path, Class type, LinkOption... options) throws IOExceptionReads a file's attributes as a bulk operation. The type parameter is the type of the attributes required and this method returns an instance of that type if supported. All implementations support a basic set of file attributes and so invoking this method with a type parameter of BasicFileAttributes.class will not throw UnsupportedOperationException. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. It is implementation specific if all file attributes are read as an atomic operation with respect to other file system operations. Usage Example: Suppose we want to read a file's attributes in bulk: Path path = ... BasicFileAttributes attrs = Files.readAttributes(path, BasicFileAttributes.class); Alternatively, suppose we want to read file's POSIX attributes without following symbolic links: PosixFileAttributes attrs = Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS); Type Parameters:A - The BasicFileAttributes typeParameters:path - the path to the filetype - the Class of the file attributes required to readoptions - options indicating how symbolic links are handledReturns:the file attributesThrows:UnsupportedOperationException - if an attributes of the given type are not supportedIOException - if an I/O error occursSecurityException - In the case of the default provider, a security manager is installed, its checkRead method is invoked to check read access to the file. If this method is invoked to read security sensitive attributes then the security manager may be invoke to check for additional permissions.setAttributepublic static Path setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOExceptionSets the value of a file attribute. The attribute parameter identifies the attribute to be set and takes the form: [view-name:]attribute-name where square brackets [...] delineate an optional component and the character ':' stands for itself. view-name is the name of a FileAttributeView that identifies a set of file attributes. If not specified then it defaults to "basic", the name of the file attribute view that identifies the basic set of file attributes common to many file systems. attribute-name is the name of the attribute within the set. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is set. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Usage Example: Suppose we want to set the DOS "hidden" attribute: Path path = ... Files.setAttribute(path, "dos:hidden", true); Parameters:path - the path to the fileattribute - the attribute to setvalue - the attribute valueoptions - options indicating how symbolic links are handledReturns:the path parameterThrows:UnsupportedOperationException - if the attribute view is not availableIllegalArgumentException - if the attribute name is not specified, or is not recognized, or the attribute value is of the correct type but has an inappropriate valueClassCastException - if the attribute value is not of the expected type or is a collection containing elements that are not of the expected typeIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, its checkWrite method denies write access to the file. If this method is invoked to set security sensitive attributes then the security manager may be invoked to check for additional permissions.getAttributepublic static Object getAttribute(Path path, String attribute, LinkOption... options) throws IOExceptionReads the value of a file attribute. The attribute parameter identifies the attribute to be read and takes the form: [view-name:]attribute-name where square brackets [...] delineate an optional component and the character ':' stands for itself. view-name is the name of a FileAttributeView that identifies a set of file attributes. If not specified then it defaults to "basic", the name of the file attribute view that identifies the basic set of file attributes common to many file systems. attribute-name is the name of the attribute. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Usage Example: Suppose we require the user ID of the file owner on a system that supports a "unix" view: Path path = ... int uid = (Integer)Files.getAttribute(path, "unix:uid"); Parameters:path - the path to the fileattribute - the attribute to readoptions - options indicating how symbolic links are handledReturns:the attribute valueThrows:UnsupportedOperationException - if the attribute view is not availableIllegalArgumentException - if the attribute name is not specified or is not recognizedIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file. If this method is invoked to read security sensitive attributes then the security manager may be invoked to check for additional permissions.readAttributespublic static Map readAttributes(Path path, String attributes, LinkOption... options) throws IOExceptionReads a set of file attributes as a bulk operation. The attributes parameter identifies the attributes to be read and takes the form: [view-name:]attribute-list where square brackets [...] delineate an optional component and the character ':' stands for itself. view-name is the name of a FileAttributeView that identifies a set of file attributes. If not specified then it defaults to "basic", the name of the file attribute view that identifies the basic set of file attributes common to many file systems. The attribute-list component is a comma separated list of zero or more names of attributes to read. If the list contains the value "*" then all attributes are read. Attributes that are not supported are ignored and will not be present in the returned map. It is implementation specific if all attributes are read as an atomic operation with respect to other file system operations. The following examples demonstrate possible values for the attributes parameter: "*" Read all basic-file-attributes. "size,lastModifiedTime,lastAccessTime" Reads the file size, last modified time, and last access time attributes. "posix:*" Read all POSIX-file-attributes. "posix:permissions,owner,size" Reads the POSX file permissions, owner, and file size. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.Parameters:path - the path to the fileattributes - the attributes to readoptions - options indicating how symbolic links are handledReturns:a map of the attributes returned; The map's keys are the attribute names, its values are the attribute valuesThrows:UnsupportedOperationException - if the attribute view is not availableIllegalArgumentException - if no attributes are specified or an unrecognized attributes is specifiedIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file. If this method is invoked to read security sensitive attributes then the security manager may be invoke to check for additional permissions.getPosixFilePermissionspublic static Set getPosixFilePermissions(Path path, LinkOption... options) throws IOExceptionReturns a file's POSIX file permissions. The path parameter is associated with a FileSystem that supports the PosixFileAttributeView. This attribute view provides access to file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.Parameters:path - the path to the fileoptions - options indicating how symbolic links are handledReturns:the file permissionsThrows:UnsupportedOperationException - if the associated file system does not support the PosixFileAttributeViewIOException - if an I/O error occursSecurityException - In the case of the default provider, a security manager is installed, and it denies RuntimePermission("accessUserInformation") or its checkRead method denies read access to the file.setPosixFilePermissionspublic static Path setPosixFilePermissions(Path path, Set perms) throws IOExceptionSets a file's POSIX permissions. The path parameter is associated with a FileSystem that supports the PosixFileAttributeView. This attribute view provides access to file attributes commonly associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.Parameters:path - The path to the fileperms - The new set of permissionsReturns:The pathThrows:UnsupportedOperationException - if the associated file system does not support the PosixFileAttributeViewClassCastException - if the sets contains elements that are not of type PosixFilePermissionIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it denies RuntimePermission("accessUserInformation") or its checkWrite method denies write access to the file.getOwnerpublic static UserPrincipal getOwner(Path path, LinkOption... options) throws IOExceptionReturns the owner of a file. The path parameter is associated with a file system that supports FileOwnerAttributeView. This file attribute view provides access to a file attribute that is the owner of the file.Parameters:path - The path to the fileoptions - options indicating how symbolic links are handledReturns:A user principal representing the owner of the fileThrows:UnsupportedOperationException - if the associated file system does not support the FileOwnerAttributeViewIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it denies RuntimePermission("accessUserInformation") or its checkRead method denies read access to the file.setOwnerpublic static Path setOwner(Path path, UserPrincipal owner) throws IOExceptionUpdates the file owner. The path parameter is associated with a file system that supports FileOwnerAttributeView. This file attribute view provides access to a file attribute that is the owner of the file. Usage Example: Suppose we want to make "joe" the owner of a file: Path path = ... UserPrincipalLookupService lookupService = provider(path).getUserPrincipalLookupService(); UserPrincipal joe = lookupService.lookupPrincipalByName("joe"); Files.setOwner(path, joe); Parameters:path - The path to the fileowner - The new file ownerReturns:The pathThrows:UnsupportedOperationException - if the associated file system does not support the FileOwnerAttributeViewIOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, it denies RuntimePermission("accessUserInformation") or its checkWrite method denies write access to the file.See Also:FileSystem.getUserPrincipalLookupService(), UserPrincipalLookupServiceisSymbolicLinkpublic static boolean isSymbolicLink(Path path)Tests whether a file is a symbolic link. Where it is required to distinguish an I/O exception from the case that the file is not a symbolic link then the file attributes can be read with the readAttributes method and the file type tested with the BasicFileAttributes.isSymbolicLink() method.Parameters:path - The path to the fileReturns:true if the file is a symbolic link; false if the file does not exist, is not a symbolic link, or it cannot be determined if the file is a symbolic link or not.Throws:SecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file.isDirectorypublic static boolean isDirectory(Path path, LinkOption... options)Tests whether a file is a directory. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Where it is required to distinguish an I/O exception from the case that the file is not a directory then the file attributes can be read with the readAttributes method and the file type tested with the BasicFileAttributes.isDirectory() method.Parameters:path - the path to the file to testoptions - options indicating how symbolic links are handledReturns:true if the file is a directory; false if the file does not exist, is not a directory, or it cannot be determined if the file is a directory or not.Throws:SecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file.isRegularFilepublic static boolean isRegularFile(Path path, LinkOption... options)Tests whether a file is a regular file with opaque content. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Where it is required to distinguish an I/O exception from the case that the file is not a regular file then the file attributes can be read with the readAttributes method and the file type tested with the BasicFileAttributes.isRegularFile() method.Parameters:path - the path to the fileoptions - options indicating how symbolic links are handledReturns:true if the file is a regular file; false if the file does not exist, is not a regular file, or it cannot be determined if the file is a regular file or not.Throws:SecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file.getLastModifiedTimepublic static FileTime getLastModifiedTime(Path path, LinkOption... options) throws IOExceptionReturns a file's last modified time. The options array may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.Parameters:path - the path to the fileoptions - options indicating how symbolic links are handledReturns:a FileTime representing the time the file was last modified, or an implementation specific default when a time stamp to indicate the time of last modification is not supported by the file systemThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file.See Also:BasicFileAttributes.lastModifiedTime()setLastModifiedTimepublic static Path setLastModifiedTime(Path path, FileTime time) throws IOExceptionUpdates a file's last modified time attribute. The file time is converted to the epoch and precision supported by the file system. Converting from finer to coarser granularities result in precision loss. The behavior of this method when attempting to set the last modified time when it is not supported by the file system or is outside the range supported by the underlying file store is not defined. It may or not fail by throwing an IOException. Usage Example: Suppose we want to set the last modified time to the current time: Path path = ... FileTime now = FileTime.fromMillis(System.currentTimeMillis()); Files.setLastModifiedTime(path, now); Parameters:path - the path to the filetime - the new last modified timeReturns:the pathThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, the security manager's checkWrite method is invoked to check write access to fileSee Also:BasicFileAttributeView.setTimes(java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime)sizepublic static long size(Path path) throws IOExceptionReturns the size of a file (in bytes). The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size of files that are not regular files is implementation specific and therefore unspecified.Parameters:path - the path to the fileReturns:the file size, in bytesThrows:IOException - if an I/O error occursSecurityException - In the case of the default provider, and a security manager is installed, its checkRead method denies read access to the file.See Also:BasicFileAttributes.size()existspublic static boolean exists(Path path, LinkOption... options)Tests whether a file exists. The options parameter may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Note that the result of this method is immediately outdated. If this method indicates the file exists then there is no guarantee that a subsequence access will succeed. Care should be taken when using this method in security sensitive applications.Parameters:path - the path to the file to testoptions - options indicating how symbolic links are handled .Returns:true if the file exists; false if the file does not exist or its existence cannot be determined.Throws:SecurityException - In the case of the default provider, the SecurityManager.checkRead(String) is invoked to check read access to the file.See Also:notExists(java.nio.file.Path, java.nio.file.LinkOption...)notExistspublic static boolean notExists(Path path, LinkOption... options)Tests whether the file located by this path does not exist. This method is intended for cases where it is required to take action when it can be confirmed that a file does not exist. The options parameter may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed. If the option NOFOLLOW_LINKS is present then symbolic links are not followed. Note that this method is not the complement of the exists method. Where it is not possible to determine if a file exists or not then both methods return false. As with the exists method, the result of this method is immediately outdated. If this method indicates the file does exist then there is no guarantee that a subsequence attempt to create the file will succeed. Care should be taken when using this method in security sensitive applications.Parameters:path - the path to the file to testoptions - options indicating how symbolic links are handledReturns:true if the file does not exist; false if the file exists or its existence cannot be determinedThrows:SecurityException - In the case of the default provider, the SecurityManager.checkRead(String) is invoked to check read access to the file.isReadablepublic static boolean isReadable(Path path)Tests whether a file is readable. This method checks that a file exists and that this Java virtual machine has appropriate privileges that would allow it open the file for reading. Depending on the implementation, this method may require to read file permissions, access control lists, or other file attributes in order to check the effective access to the file. Consequently, this method may not be atomic with respect to other file system operations. Note that the result of this method is immediately outdated, there is no guarantee that a subsequent attempt to open the file for reading will succeed (or even that it will access the same file). Care should be taken when using this method in security sensitive applications.Parameters:path - the path to the file to checkReturns:true if the file exists and is readable; false if the file does not exist, read access would be denied because the Java virtual machine has insufficient privileges, or access cannot be determinedThrows:SecurityException - In the case of the default provider, and a security manager is installed, the checkRead is invoked to check read access to the file.isWritablepublic static boolean isWritable(Path path)Tests whether a file is writable. This method checks that a file exists and that this Java virtual machine has appropriate privileges that would allow it open the file for writing. Depending on the implementation, this method may require to read file permissions, access control lists, or other file attributes in order to check the effective access to the file. Consequently, this method may not be atomic with respect to other file system operations. Note that result of this method is immediately outdated, there is no guarantee that a subsequent attempt to open the file for writing will succeed (or even that it will access the same file). Care should be taken when using this method in security sensitive applications.Parameters:path - the path to the file to checkReturns:true if the file exists and is writable; false if the file does not exist, write access would be denied because the Java virtual machine has insufficient privileges, or access cannot be determinedThrows:SecurityException - In the case of the default provider, and a security manager is installed, the checkWrite is invoked to check write access to the file.isExecutablepublic static boolean isExecutable(Path path)Tests whether a file is executable. This method checks that a file exists and that this Java virtual machine has appropriate privileges to execute the file. The semantics may differ when checking access to a directory. For example, on UNIX systems, checking for execute access checks that the Java virtual machine has permission to search the directory in order to access file or subdirectories. Depending on the implementation, this method may require to read file permissions, access control lists, or other file attributes in order to check the effective access to the file. Consequently, this method may not be atomic with respect to other file system operations. Note that the result of this method is immediately outdated, there is no guarantee that a subsequent attempt to execute the file will succeed (or even that it will access the same file). Care should be taken when using this method in security sensitive applications.Parameters:path - the path to the file to checkReturns:true if the file exists and is executable; false if the file does not exist, execute access would be denied because the Java virtual machine has insufficient privileges, or access cannot be determinedThrows:SecurityException - In the case of the default provider, and a security manager is installed, the checkExec is invoked to check execute access to the file.walkFileTreepublic static Path walkFileTree(Path start, Set options, int maxDepth, FileVisitor e24fc04721

wiso mein bro update download

strongbox 3d model free download

sites to download gta vice city

download how to make a helicopter

download st12 trace