public abstract class FileAccess
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileAccess.Attributes
Attributes of a working file on disk
|
| Constructor and Description |
|---|
FileAccess() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
createSymbolicLink(java.lang.String link,
java.lang.String targetPath)
Creates a symbolic link to the target specified.
|
boolean |
getCanWrite(java.lang.String file)
Return true if the file is writable by the user.
|
abstract long |
getFileLength(java.lang.String file) |
abstract boolean |
getIsExecutable(java.lang.String file)
Return true if the file is "executable" by the user.
|
abstract long |
getLastModified(java.lang.String file)
Return the the file's last modified time.
|
abstract java.lang.String |
getSymbolicLinkTarget(java.lang.String absolutePath) |
abstract boolean |
isRemoteDrive(java.lang.String file) |
abstract boolean |
isSymbolicLink(java.lang.String absolutePath) |
abstract void |
loadFileAttributes(FileAccess.Attributes[] attributes)
Load all available attributes from the file system in bulk Each attribute
object in the array should have the fully qualified file name (with path)
specified.
|
abstract void |
setCanWrite(java.lang.String file,
boolean value)
Change whether or not the local file can be modified.
|
abstract void |
setIsExecutable(java.lang.String file,
boolean executable)
Change whether or not the specified file should be marked "executable".
|
abstract void |
setLastModified(java.lang.String file,
long time)
Change the the file's last modified time.
|
public abstract long getLastModified(java.lang.String file)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.public abstract void setLastModified(java.lang.String file,
long time)
throws java.io.IOException
file - the specified filetime - the new file timejava.io.IOException - if an I/0 error occurs trying to access the file.public boolean getCanWrite(java.lang.String file)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.public abstract void setCanWrite(java.lang.String file,
boolean value)
throws java.io.IOException
file - the specified filevalue - true if the file should be writable and false if notjava.io.IOException - if an I/0 error occurs trying to access the file.public abstract boolean getIsExecutable(java.lang.String file)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.public abstract void setIsExecutable(java.lang.String file,
boolean executable)
throws java.io.IOException
file - the specified fileexecutable - true if the file should be marked executablejava.io.IOException - if an I/0 error occurs trying to access the file.public abstract long getFileLength(java.lang.String file)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.public abstract boolean isRemoteDrive(java.lang.String file)
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.Platformpublic abstract void loadFileAttributes(FileAccess.Attributes[] attributes)
attributes - the attributes to loadpublic abstract java.lang.String getSymbolicLinkTarget(java.lang.String absolutePath)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.Platformpublic abstract boolean isSymbolicLink(java.lang.String absolutePath)
throws java.io.IOException
file - the specified filejava.io.IOException - if an I/0 error occurs trying to access the file.Platformpublic abstract void createSymbolicLink(java.lang.String link,
java.lang.String targetPath)
throws java.io.IOException
link - the symbolic linktargetPath - the target path for the symbolic linkjava.io.IOException - if an I/0 error occurs trying to access the file.PlatformStarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.