public class RpcPerforceFile
extends java.io.File
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
systemTmpDirName |
static java.lang.String |
TMP_FILE_PFX |
static java.lang.String |
TMP_FILE_SFX |
static java.lang.String |
TRACE_PREFIX |
Constructor and Description |
---|
RpcPerforceFile(java.lang.String fileName,
RpcPerforceFileType fileType) |
RpcPerforceFile(java.lang.String fileName,
RpcPerforceFileType fileType,
ClientLineEnding lineEnding) |
RpcPerforceFile(java.lang.String fileName,
java.lang.String fileTypeStr) |
Modifier and Type | Method and Description |
---|---|
boolean |
canCopyAsIs()
True IFF we should be able to copy this file as-is, i.e.
|
boolean |
copyTo(java.io.File targetFile)
Copy this file to another (target file).
|
static java.lang.String |
createTempFileName(java.lang.String tmpDirName) |
boolean |
decodeTo(java.io.File targetFile) |
boolean |
equals(java.lang.Object obj) |
static boolean |
fileExists(java.io.File file,
boolean fstSymlink)
Check if the file or symbolic link exists.
|
RpcPerforceFileType |
getFileType() |
ClientLineEnding |
getLineEnding() |
int |
hashCode() |
boolean |
isSymlink() |
boolean |
renameTo(java.io.File targetFile)
Our "special" version of rename, intended to cope with the
cases when the normal rename won't work (typically cross-device
renames) or when we need to do some under-the-covers stitching
up (for example, GKZIP stream decoding).
|
boolean |
renameTo(java.io.File targetFile,
boolean alwaysCopyUnMunged)
Another special version of renameTo to support RPC implementation-
specific needs.
|
void |
setFileType(RpcPerforceFileType fileType) |
void |
setLineEnding(ClientLineEnding lineEnding) |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
public static java.lang.String TRACE_PREFIX
public static java.lang.String systemTmpDirName
public static final java.lang.String TMP_FILE_PFX
public static final java.lang.String TMP_FILE_SFX
public RpcPerforceFile(java.lang.String fileName, java.lang.String fileTypeStr)
public RpcPerforceFile(java.lang.String fileName, RpcPerforceFileType fileType)
public RpcPerforceFile(java.lang.String fileName, RpcPerforceFileType fileType, ClientLineEnding lineEnding)
public static java.lang.String createTempFileName(java.lang.String tmpDirName)
public boolean renameTo(java.io.File targetFile)
renameTo
in class java.io.File
public boolean renameTo(java.io.File targetFile, boolean alwaysCopyUnMunged)
targetFile
- targetFilealwaysCopyUnMunged
- alwaysCopyUnMungedpublic boolean copyTo(java.io.File targetFile) throws java.io.IOException
targetFile
- targetFilejava.io.IOException
- on errorpublic boolean decodeTo(java.io.File targetFile) throws java.io.IOException
java.io.IOException
public RpcPerforceFileType getFileType()
public void setFileType(RpcPerforceFileType fileType)
public ClientLineEnding getLineEnding()
public void setLineEnding(ClientLineEnding lineEnding)
public boolean canCopyAsIs()
public boolean equals(java.lang.Object obj)
equals
in class java.io.File
File.equals(Object)
public int hashCode()
hashCode
in class java.io.File
File.hashCode()
public boolean isSymlink()
public static boolean fileExists(java.io.File file, boolean fstSymlink)
file
- filefstSymlink
- fstSymlink