com.perforce.p4java.impl.mapbased.rpc.sys
Class RpcPerforceFile
java.lang.Object
java.io.File
com.perforce.p4java.impl.mapbased.rpc.sys.RpcPerforceFile
- All Implemented Interfaces:
- Serializable, Comparable<File>
public class RpcPerforceFile
- extends File
Encapsulates and implements a lot of Perforce-specific information
and operations on Perforce client-side files by extending the basic
java.io.File class with Perforce-specific fields and methods.
- See Also:
- Serialized Form
Methods inherited from class java.io.File |
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, toString, toURI, toURL |
TRACE_PREFIX
public static String TRACE_PREFIX
systemTmpDirName
public static String systemTmpDirName
TMP_FILE_PFX
public static final String TMP_FILE_PFX
- See Also:
- Constant Field Values
TMP_FILE_SFX
public static final String TMP_FILE_SFX
- See Also:
- Constant Field Values
RpcPerforceFile
public RpcPerforceFile(String fileName,
String fileTypeStr)
RpcPerforceFile
public RpcPerforceFile(String fileName,
RpcPerforceFileType fileType)
createTempFileName
public static String createTempFileName(String tmpDirName)
renameTo
public boolean renameTo(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).
- Overrides:
renameTo
in class File
renameTo
public boolean renameTo(File targetFile,
boolean alwaysCopyUnMunged)
- Another special version of renameTo to support RPC implementation-
specific needs. This one allows callers to specify whether to
always copy as-is (no munging).
copyTo
public boolean copyTo(File targetFile)
throws IOException
- Copy this file to another (target file). Assumes no
decoding necessary. If the target file exists,
it's removed before copying.
- Throws:
IOException
decodeTo
public boolean decodeTo(File targetFile)
throws IOException
- Throws:
IOException
getFileType
public RpcPerforceFileType getFileType()
setFileType
public void setFileType(RpcPerforceFileType fileType)
getLineEnding
public ClientLineEnding getLineEnding()
setLineEnding
public void setLineEnding(ClientLineEnding lineEnding)
canCopyAsIs
public boolean canCopyAsIs()
- True IFF we should be able to copy this file as-is, i.e. without
GKZIP decoding or munging, etc. Currently all file types can
be copied as-is, but this wasn't always true and may not always
be true...
equals
public boolean equals(Object obj)
- Overrides:
equals
in class File
- See Also:
java.io.File#equals()
hashCode
public int hashCode()
- Overrides:
hashCode
in class File
- See Also:
File.hashCode()
Copyright © 2015 Perforce Software. All Rights Reserved.