public class CoreDiskSession extends DiskSession
Attributes, DefaultInformationLevel, WriteDate, WriteTime
Closed, 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(String dir)
Create a new directory on the remote file server.
|
SMBFile |
CreateFile(String fname)
Create and open a file on the remote file server.
|
void |
DeleteDirectory(String dir)
Delete the specified directory on the remote file server.
|
void |
DeleteFile(String fname,
int attr)
Delete the specified file on the remote server.
|
DiskInfo |
getDiskInformation()
Get disk information for this remote disk.
|
FileInfo |
getFileInformation(String fname,
int level)
Get file information for the specified file.
|
VolumeInfo |
getVolumeInformation()
Get the disk volume information
|
boolean |
isDirectory(String dir)
Check if the specified file name is a directory.
|
SMBFile |
OpenFile(String fname,
int flags)
Open a file on the remote file server.
|
boolean |
RenameFile(String curnam,
String newnam,
int attr)
Rename a file, or set of files, on the remote file server.
|
void |
setFileAttributes(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(String fname,
FileInfo finfo)
Set file information for the specified file.
|
SearchContext |
StartSearch(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, StartSearch
allocatePacket, 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, verifyRxPacket
protected CoreDiskSession(PCShare shr, int dialect)
shr
- Remote server details.dialect
- SMB dialect that this session is usingpublic void CloseSession() throws IOException, SMBException
CloseSession
in class DiskSession
IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final void CreateDirectory(String dir) throws IOException, SMBException
CreateDirectory
in class DiskSession
dir
- 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.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final SMBFile CreateFile(String fname) throws IOException, SMBException
CreateFile
in class DiskSession
fname
- Remote file name string.IOException
- If an I/O error occursSMBException
- If an SMB error occurspublic final void DeleteDirectory(String dir) throws IOException, SMBException
DeleteDirectory
in class DiskSession
dir
- 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.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final void DeleteFile(String fname, int attr) throws IOException, SMBException
DeleteFile
in class DiskSession
fname
- File to delete on the remote server.attr
- Attributes of the file to be deleted. @see
org.alfresco.jlan.server.filesys.FileAttributeIOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final DiskInfo getDiskInformation() throws IOException, SMBException
getDiskInformation
in class DiskSession
IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final FileInfo getFileInformation(String fname, int level) throws IOException, SMBException
getFileInformation
in class DiskSession
fname
- File name of the file to return information for.level
- Information level required. @see org.alfresco.jlan.smb.FileInfoLevelIOException
- If an I/O error occurs.SMBException
- If an SMB level error occursFileNotFoundException
- If the remote file does not exist.public final VolumeInfo getVolumeInformation() throws IOException, SMBException
getVolumeInformation
in class DiskSession
IOException
- If an I/O error occursSMBException
- If an SMB level error occursFileNotFoundException
- If the remote file does not exist.public final boolean isDirectory(String dir) throws IOException, SMBException
isDirectory
in class DiskSession
dir
- 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.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final SMBFile OpenFile(String fname, int flags) throws IOException, SMBException
OpenFile
in class DiskSession
fname
- Remote file name string.flags
- File open option flags.IOException
- If an I/O error occursSMBException
- If an SMB level error occurspublic final boolean RenameFile(String curnam, String newnam, int attr) throws IOException, SMBException
RenameFile
in class DiskSession
curnam
- 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.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occursFileAttribute
public final void setFileInformation(String fname, FileInfo finfo) throws IOException, SMBException
setFileInformation
in class DiskSession
fname
- File name of the file to set information for.finfo
- File information containing the new values.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final void setFileInformation(SMBFile file, FileInfo finfo) throws IOException, SMBException
setFileInformation
in class DiskSession
file
- File to set information for.finfo
- File information containing the new values.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final void setFileAttributes(String fname, int attrib) throws IOException, SMBException
setFileAttributes
in class DiskSession
fname
- File name of the file to set information for.attrib
- File attributes mask. @see org.alfresco.jlan.server.filesys.FileAttributeIOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic final SearchContext StartSearch(String dir, int attr, int level) throws IOException, SMBException
StartSearch
in class DiskSession
dir
- 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.FileInfoLevelIOException
- If an I/O error occursSMBException
- If an SMB level error occursCopyright © 2005–2018 Alfresco Software. All rights reserved.