|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CifsDisk
declares the disk operations.
How to access the disk service?
CifsDisk disk = CifsSessionManager.connectDisk("sessionname","\\server\share");
CifsSessionManager.connectDisk(java.lang.String, java.lang.String)
Field Summary | |
static int |
SM_DENY_NONE
Allow all actions |
static int |
SM_DENY_READ_EXEC
Deny read/execute |
static int |
SM_DENY_WRITE
Deny write |
static int |
SM_EXCLUSIVE
Deny read/write/execute (exclusive) |
Method Summary | |
void |
deleteFile(java.lang.String file)
Deletes the given file |
boolean |
directoryExists(java.lang.String dirname)
Checks if directory exists |
long |
getFile(java.lang.String file,
java.io.OutputStream out)
Gets the file from the server and writes the content to the given output stream. |
long |
getFile(java.lang.String file,
java.io.Writer out)
Gets the file from the server and writes the content to the given output stream. |
CifsFileInfo |
getFileInfo(java.lang.String file)
Returns information about the given file |
CifsFileSystemInfo |
getFileSystemInfo()
Returns informations about the filesystem |
CifsFileInfo[] |
listFilesInfo(java.lang.String file,
int searchattr,
boolean sort)
Enumerates informations about the files |
java.lang.String[] |
listFilesName(java.lang.String file,
int searchattr,
boolean sort)
Enumerates file names |
void |
mkdir(java.lang.String dirname)
Creates the given directory on the server |
long |
putFile(java.lang.String file,
java.io.InputStream in)
Puts the data from the input stream to the given remote file. |
long |
putFile(java.lang.String file,
java.io.Reader in)
Puts the data from the input stream to the given remote file. |
void |
renameFile(java.lang.String oldfile,
java.lang.String newfile)
Renames the old file to the new file (also hidden and system files) |
void |
renameFile(java.lang.String oldfile,
java.lang.String newfile,
int searchattr)
Renames file corresponding to the search attributes |
void |
rmdir(java.lang.String dirname)
Removes directory |
void |
setFileAttribute(java.lang.String file,
int attr,
boolean set)
Sets or resets file attributes (CifsFileInfo.FILE_ATTR_*) |
Methods inherited from interface org.gnu.jcifs.CifsSession |
disconnect,
echo,
getConnectTime,
getNetBIOSName,
getProperty,
getServerAddress,
getServerLanMan,
getServerOS,
getServerPrimaryDomain,
getServerTime,
getServerTimeZone,
getSessionName,
getShareName,
isConnected,
isUserLevelSecurity,
reconnect,
setAllowAutoReconnection,
setProperty |
Field Detail |
public static final int SM_EXCLUSIVE
public static final int SM_DENY_WRITE
public static final int SM_DENY_READ_EXEC
public static final int SM_DENY_NONE
Method Detail |
public long getFile(java.lang.String file, java.io.OutputStream out) throws java.io.IOException
file
- remote file name (relativ to share)out
- output streampublic long getFile(java.lang.String file, java.io.Writer out) throws java.io.IOException
file
- remote file name (relativ to share)out
- writerpublic long putFile(java.lang.String file, java.io.Reader in) throws java.io.IOException
file
- remote file name (relativ to share)in
- input readerpublic long putFile(java.lang.String file, java.io.InputStream in) throws java.io.IOException
file
- remote file name (relativ to share)in
- input streampublic void deleteFile(java.lang.String file) throws java.io.IOException
file
- remote file namepublic void renameFile(java.lang.String oldfile, java.lang.String newfile) throws java.io.IOException
oldfile
- old filenewfile
- new filepublic void renameFile(java.lang.String oldfile, java.lang.String newfile, int searchattr) throws java.io.IOException
oldfile
- old filenewfile
- new filesearchattr
- search attributes (see CifsFileInfo.FILE_ATTR_*)CifsFile
,
CifsFileInfo
public void setFileAttribute(java.lang.String file, int attr, boolean set) throws java.io.IOException
file
- file nameattr
- new file attributesset
- if true sets the given attributes otherwise resets itCifsFile
,
CifsFileInfo
public void mkdir(java.lang.String dirname) throws java.io.IOException
dirname
- directory namepublic void rmdir(java.lang.String dirname) throws java.io.IOException
dirname
- directory namepublic boolean directoryExists(java.lang.String dirname) throws java.io.IOException
dirname
- directory namepublic CifsFileSystemInfo getFileSystemInfo() throws java.io.IOException
public CifsFileInfo getFileInfo(java.lang.String file) throws java.io.IOException
file
- file namepublic CifsFileInfo[] listFilesInfo(java.lang.String file, int searchattr, boolean sort) throws java.io.IOException
file
- file name (with wildcards)searchattr
- file attributes (see CifsFileInfo.FILE_ATTR_*)sort
- if true names will be sortedCifsFileInfo
elementspublic java.lang.String[] listFilesName(java.lang.String file, int searchattr, boolean sort) throws java.io.IOException
file
- file name (with wildcards)searchattr
- file attributessort
- if true names will be sortedjava.lang.String
elements
|
Norbert Hranitzky | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |