public class CoreDiskSession extends DiskSession
Attributes, DefaultInformationLevel, WriteDate, WriteTimeClosed, DBGDumpPacket, DBGHexDump, DBGPacketType, DBGSigning, DEFAULT_BUFSIZE, m_pkt, m_treeid, NO_TRANSACTION, SecurityModeShare, SecurityModeUser| Modifier | Constructor and Description |
|---|---|
protected |
CoreDiskSession(PCShare shr,
int dialect)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
CloseSession()
Close this connection with the remote server share.
|
void |
CreateDirectory(java.lang.String dir)
Create a new directory on the remote file server.
|
SMBFile |
CreateFile(java.lang.String fname)
Create and open a file on the remote file server.
|
void |
DeleteDirectory(java.lang.String dir)
Delete the specified directory on the remote file server.
|
void |
DeleteFile(java.lang.String fname,
int attr)
Delete the specified file on the remote server.
|
DiskInfo |
getDiskInformation()
Get disk information for this remote disk.
|
FileInfo |
getFileInformation(java.lang.String fname,
int level)
Get file information for the specified file.
|
VolumeInfo |
getVolumeInformation()
Get the disk volume information
|
boolean |
isDirectory(java.lang.String dir)
Check if the specified file name is a directory.
|
SMBFile |
OpenFile(java.lang.String fname,
int flags)
Open a file on the remote file server.
|
boolean |
RenameFile(java.lang.String curnam,
java.lang.String newnam,
int attr)
Rename a file, or set of files, on the remote file server.
|
void |
setFileAttributes(java.lang.String fname,
int attrib)
Set file attributes for the specified file, using the file name
|
void |
setFileInformation(SMBFile file,
FileInfo finfo)
Set file information for the specified file, using the file id
|
void |
setFileInformation(java.lang.String fname,
FileInfo finfo)
Set file information for the specified file.
|
SearchContext |
StartSearch(java.lang.String dir,
int attr,
int level)
Start a search of the specified directory returning information for each file/directory
found.
|
DeleteFile, FileExists, finalize, getFileInformation, getWorkingDirectory, isClosed, isValidFilePath, OpenInputStream, OpenOutputStream, RenameFile, setWorkingDirectory, StartSearchallocatePacket, disableSMBSigning, enableSMBSigning, getCapabilities, getDefaultFlags, getDefaultFlags2, getDeviceType, getDialect, getDialectString, getDomain, getEncryptionKey, getLANManagerType, getMaximumMultiplexedRequests, getMaximumPacketSize, getMaximumVirtualCircuits, getNextMultiplexId, getNextSessionId, getOperatingSystem, getPassword, getPCShare, getProcessId, getSecurityMode, getServer, getSession, getSessionId, getShareName, getSMBSequence, getTreeId, getUserId, getUserName, hasActiveTransaction, hasDataAvailable, hasDebug, hasDebugOption, hasEncryptionKey, hasSMBSigning, isActive, isGuest, isUnicode, pingServer, pingServer, processAsynchResponse, setCapabilities, setDebug, setDefaultFlags, setDefaultFlags2, setDeviceType, setDialect, setDialectString, setDomain, setEncryptionKey, setGuest, setLANManagerType, setMaximumMultiplexedRequests, setMaximumPacketSize, setMaximumVirtualCircuits, setOperatingSystem, setPassword, setProcessId, setSecurityMode, setServer, setSession, setShareName, setSMBSequence, setTransactionMID, setTreeId, setUserId, setUserName, signTxPacket, supportsLargeFiles, supportsLevel2Oplocks, supportsLockAndRead, supportsNTFind, supportsNTSmbs, supportsNTStatusCodes, supportsRawMode, supportsRPCAPIs, supportsUnicode, toString, verifyRxPacketprotected CoreDiskSession(PCShare shr, int dialect)
shr - Remote server details.dialect - SMB dialect that this session is usingpublic void CloseSession()
throws java.io.IOException,
SMBException
CloseSession in class DiskSessionjava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final void CreateDirectory(java.lang.String dir)
throws java.io.IOException,
SMBException
CreateDirectory in class DiskSessiondir - Directory name string. If the directory name does not have a leading '\' the
current working directory for this session will be prepended to the string.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final SMBFile CreateFile(java.lang.String fname) throws java.io.IOException, SMBException
CreateFile in class DiskSessionfname - Remote file name string.java.io.IOException - If an I/O error occursSMBException - If an SMB error occurspublic final void DeleteDirectory(java.lang.String dir)
throws java.io.IOException,
SMBException
DeleteDirectory in class DiskSessiondir - Directory name string. If the directory name does not have a leading '\' the
current working directory for this session will be preprended to the string.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final void DeleteFile(java.lang.String fname,
int attr)
throws java.io.IOException,
SMBException
DeleteFile in class DiskSessionfname - File to delete on the remote server.attr - Attributes of the file to be deleted. @see
org.alfresco.jlan.server.filesys.FileAttributejava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final DiskInfo getDiskInformation() throws java.io.IOException, SMBException
getDiskInformation in class DiskSessionjava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final FileInfo getFileInformation(java.lang.String fname, int level) throws java.io.IOException, SMBException
getFileInformation in class DiskSessionfname - File name of the file to return information for.level - Information level required. @see org.alfresco.jlan.smb.FileInfoLeveljava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occursjava.io.FileNotFoundException - If the remote file does not exist.public final VolumeInfo getVolumeInformation() throws java.io.IOException, SMBException
getVolumeInformation in class DiskSessionjava.io.IOException - If an I/O error occursSMBException - If an SMB level error occursjava.io.FileNotFoundException - If the remote file does not exist.public final boolean isDirectory(java.lang.String dir)
throws java.io.IOException,
SMBException
isDirectory in class DiskSessiondir - Directory name string. If the directory name does not have a leading '\' the
current working directory for this session will be preprended to the string.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final SMBFile OpenFile(java.lang.String fname, int flags) throws java.io.IOException, SMBException
OpenFile in class DiskSessionfname - Remote file name string.flags - File open option flags.java.io.IOException - If an I/O error occursSMBException - If an SMB level error occurspublic final boolean RenameFile(java.lang.String curnam,
java.lang.String newnam,
int attr)
throws java.io.IOException,
SMBException
RenameFile in class DiskSessioncurnam - Current file name string, may contain wildcards. If the path does not start
with a '\' the current working directory string will be preprended.newnam - New file name.attr - Search attributes, to determine which file(s) to rename.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occursFileAttributepublic final void setFileInformation(java.lang.String fname,
FileInfo finfo)
throws java.io.IOException,
SMBException
setFileInformation in class DiskSessionfname - File name of the file to set information for.finfo - File information containing the new values.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final void setFileInformation(SMBFile file, FileInfo finfo) throws java.io.IOException, SMBException
setFileInformation in class DiskSessionfile - File to set information for.finfo - File information containing the new values.java.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final void setFileAttributes(java.lang.String fname,
int attrib)
throws java.io.IOException,
SMBException
setFileAttributes in class DiskSessionfname - File name of the file to set information for.attrib - File attributes mask. @see org.alfresco.jlan.server.filesys.FileAttributejava.io.IOException - If an I/O error occurs.SMBException - If an SMB level error occurspublic final SearchContext StartSearch(java.lang.String dir, int attr, int level) throws java.io.IOException, SMBException
StartSearch in class DiskSessiondir - Directory to start searching. If the directory string does not start with a '\'
then the directory name is prepended with the current working directory.attr - Search attributes, to determine the types of files/directories returned. @see
org.alfresco.jlan.server.filesys.FileAttributelevel - Information level required. @see org.alfresco.jlan.smb.FileInfoLeveljava.io.IOException - If an I/O error occursSMBException - If an SMB level error occursCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.