com.starla.smb
Class SMBCoreDiskSession

java.lang.Object
  |
  +--com.starla.smb.SMBSession
        |
        +--com.starla.smb.SMBDiskSession
              |
              +--com.starla.smb.SMBCoreDiskSession

public class SMBCoreDiskSession
extends SMBDiskSession

SMB core disk session class


Fields inherited from class com.starla.smb.SMBDiskSession
Attributes, WriteDate, WriteTime
 
Fields inherited from class com.starla.smb.SMBSession
DBGDumpPacket, DBGHexDump, DBGPacketType, DEFAULT_BUFSIZE, EncryptPass, RawRead, RawWrite, UserMode
 
Method Summary
 void CloseSession()
          Close this connection with the remote server share.
 boolean CreateDirectory(java.lang.String dir)
          Createa new directory on the remote file server.
 boolean DeleteDirectory(java.lang.String dir)
          Delete the specified directory on the remote file server.
 void DeleteFile(java.lang.String fname, int attr)
          This method was created in VisualAge.
 SMBDiskInfo getDiskInformation()
          Get disk information for this remote disk.
 SMBFileInfo getFileInformation(java.lang.String fname)
          Get file information for the specified file.
 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 setFileInformation(java.lang.String fname, SMBFileInfo finfo, int flags)
          Set file information for the specified file.
 SMBSearchContext StartSearch(java.lang.String dir, int attr)
          Start a search of the specified directory returning information for each file/directory found.
 
Methods inherited from class com.starla.smb.SMBDiskSession
DeleteFile, FileExists, getWorkingDirectory, isClosed, OpenInputStream, OpenOutputStream, RenameFile, setWorkingDirectory
 
Methods inherited from class com.starla.smb.SMBSession
getDeviceType, getDialect, getDomain, getEncryptionKey, getLANManagerType, getMaximumPacketSize, getOperatingSystem, getPassword, getServer, getSessionFlag, getSessionId, getShareName, getUserId, getUserName, hasDebugOption, isActive, isDebug, print, println, println, setDebug, setEncryptionKey, setRawMode, setSecurityMode, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

CloseSession

public void CloseSession()
                  throws java.io.IOException
Close this connection with the remote server share.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
CloseSession in class SMBDiskSession

CreateDirectory

public final boolean CreateDirectory(java.lang.String dir)
                              throws java.io.IOException
Createa new directory on the remote file server.
Parameters:
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.
Returns:
true if the directory was created, else false.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
CreateDirectory in class SMBDiskSession

DeleteDirectory

public final boolean DeleteDirectory(java.lang.String dir)
                              throws java.io.IOException
Delete the specified directory on the remote file server.
Parameters:
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.
Returns:
true if the directory was deleted, else false.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
DeleteDirectory in class SMBDiskSession

DeleteFile

public final void DeleteFile(java.lang.String fname,
                             int attr)
                      throws java.io.IOException
This method was created in VisualAge.
Overrides:
DeleteFile in class SMBDiskSession

getDiskInformation

public final SMBDiskInfo getDiskInformation()
                                     throws java.io.IOException
Get disk information for this remote disk.
Returns:
Disk information object, or null.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
getDiskInformation in class SMBDiskSession

getFileInformation

public final SMBFileInfo getFileInformation(java.lang.String fname)
                                     throws java.io.IOException
Get file information for the specified file.
Parameters:
fname - File name of the file to return information for.
Returns:
SMBFileInfo if the request was successful, else null.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
getFileInformation in class SMBDiskSession

isDirectory

public final boolean isDirectory(java.lang.String dir)
                          throws java.io.IOException
Check if the specified file name is a directory.
Parameters:
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.
Returns:
true if the specified file name is a directory, else false.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
isDirectory in class SMBDiskSession

OpenFile

public final SMBFile OpenFile(java.lang.String fname,
                              int flags)
                       throws java.io.IOException
Open a file on the remote file server.
Parameters:
fname - Remote file name string.
flags - File open option flags.
Returns:
SMBFile for the opened file, else null.
Throws:
java.io.IOException - If an I/O error occurs
Overrides:
OpenFile in class SMBDiskSession

RenameFile

public final boolean RenameFile(java.lang.String curnam,
                                java.lang.String newnam,
                                int attr)
                         throws java.io.IOException
Rename a file, or set of files, on the remote file server.
Parameters:
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.
Returns:
true if the file rename request was successful, else false.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
RenameFile in class SMBDiskSession

setFileInformation

public final void setFileInformation(java.lang.String fname,
                                     SMBFileInfo finfo,
                                     int flags)
                              throws java.io.IOException
Set file information for the specified file.
Parameters:
fname - File name of the file to set information for.
finfo - File information containing the new values.
flags - Bit mask of the information to set.
Throws:
java.io.IOException - If an I/O error occurs.
Overrides:
setFileInformation in class SMBDiskSession

StartSearch

public final SMBSearchContext StartSearch(java.lang.String dir,
                                          int attr)
                                   throws java.io.IOException
Start a search of the specified directory returning information for each file/directory found.
Parameters:
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.
Returns:
SMBSearchContext for this search, else null
Throws:
java.io.IOException - If an I/O error occurs
Overrides:
StartSearch in class SMBDiskSession