public interface DiskInterface extends DeviceInterface
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile(SrvSession sess,
TreeConnection tree,
NetworkFile param)
Close the file.
|
void |
createDirectory(SrvSession sess,
TreeConnection tree,
FileOpenParams params)
Create a new directory on this file system.
|
NetworkFile |
createFile(SrvSession sess,
TreeConnection tree,
FileOpenParams params)
Create a new file on the file system.
|
void |
deleteDirectory(SrvSession sess,
TreeConnection tree,
java.lang.String dir)
Delete the directory from the filesystem.
|
void |
deleteFile(SrvSession sess,
TreeConnection tree,
java.lang.String name)
Delete the specified file.
|
int |
fileExists(SrvSession sess,
TreeConnection tree,
java.lang.String name)
Check if the specified file exists, and whether it is a file or directory.
|
void |
flushFile(SrvSession sess,
TreeConnection tree,
NetworkFile file)
Flush any buffered output for the specified file.
|
FileInfo |
getFileInformation(SrvSession sess,
TreeConnection tree,
java.lang.String name)
Get the file information for the specified file.
|
boolean |
isReadOnly(SrvSession sess,
DeviceContext ctx)
Determine if the disk device is read-only.
|
NetworkFile |
openFile(SrvSession sess,
TreeConnection tree,
FileOpenParams params)
Open a file on the file system.
|
int |
readFile(SrvSession sess,
TreeConnection tree,
NetworkFile file,
byte[] buf,
int bufPos,
int siz,
long filePos)
Read a block of data from the specified file.
|
void |
renameFile(SrvSession sess,
TreeConnection tree,
java.lang.String oldName,
java.lang.String newName)
Rename the specified file.
|
long |
seekFile(SrvSession sess,
TreeConnection tree,
NetworkFile file,
long pos,
int typ)
Seek to the specified file position.
|
void |
setFileInformation(SrvSession sess,
TreeConnection tree,
java.lang.String name,
FileInfo info)
Set the file information for the specified file.
|
SearchContext |
startSearch(SrvSession sess,
TreeConnection tree,
java.lang.String searchPath,
int attrib)
Start a new search on the filesystem using the specified searchPath that may contain
wildcards.
|
void |
truncateFile(SrvSession sess,
TreeConnection tree,
NetworkFile file,
long siz)
Truncate a file to the specified size
|
int |
writeFile(SrvSession sess,
TreeConnection tree,
NetworkFile file,
byte[] buf,
int bufoff,
int siz,
long fileoff)
Write a block of data to the file.
|
createContext, treeClosed, treeOpenedvoid closeFile(SrvSession sess, TreeConnection tree, NetworkFile param) throws java.io.IOException
sess - Server sessiontree - Tree connection.param - Network file context.java.io.IOException - If an error occurs.void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params) throws java.io.IOException
sess - Server sessiontree - Tree connection.params - Directory create parametersjava.io.IOException - If an error occurs.NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params) throws java.io.IOException
sess - Server sessiontree - Tree connectionparams - File create parametersjava.io.IOException - If an error occurs.void deleteDirectory(SrvSession sess, TreeConnection tree, java.lang.String dir) throws java.io.IOException
sess - Server sessiontree - Tree connectiondir - Directory name.java.io.IOException - The exception description.void deleteFile(SrvSession sess, TreeConnection tree, java.lang.String name) throws java.io.IOException
sess - Server sessiontree - Tree connectionname - File namejava.io.IOException - The exception description.int fileExists(SrvSession sess, TreeConnection tree, java.lang.String name)
sess - Server sessiontree - Tree connectionname - java.lang.StringFileStatusvoid flushFile(SrvSession sess, TreeConnection tree, NetworkFile file) throws java.io.IOException
sess - Server sessiontree - Tree connectionfile - Network file context.java.io.IOException - The exception description.FileInfo getFileInformation(SrvSession sess, TreeConnection tree, java.lang.String name) throws java.io.IOException
sess - Server sessiontree - Tree connectionname - File name/path that information is required for.java.io.IOException - The exception description.boolean isReadOnly(SrvSession sess, DeviceContext ctx) throws java.io.IOException
sess - Server sessionctx - Device contextjava.io.IOException - If an error occurs.NetworkFile openFile(SrvSession sess, TreeConnection tree, FileOpenParams params) throws java.io.IOException
sess - Server sessiontree - Tree connectionparams - File open parametersjava.io.IOException - If an error occurs.int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos) throws java.io.IOException
sess - Session detailstree - Tree connectionfile - Network filebuf - Buffer to return data tobufPos - Starting position in the return buffersiz - Maximum size of data to returnfilePos - File offset to read datajava.io.IOException - The exception description.void renameFile(SrvSession sess, TreeConnection tree, java.lang.String oldName, java.lang.String newName) throws java.io.IOException
sess - Server sessiontree - Tree connectionoldName - java.lang.StringnewName - java.lang.Stringjava.io.IOException - The exception description.long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, long pos, int typ) throws java.io.IOException
sess - Server sessiontree - Tree connectionfile - Network file.pos - Position to seek to.typ - Seek type.java.io.IOExceptionvoid setFileInformation(SrvSession sess, TreeConnection tree, java.lang.String name, FileInfo info) throws java.io.IOException
sess - Server sessiontree - Tree connectionname - java.lang.Stringinfo - FileInfojava.io.IOException - The exception description.SearchContext startSearch(SrvSession sess, TreeConnection tree, java.lang.String searchPath, int attrib) throws java.io.FileNotFoundException
sess - Server sessiontree - Tree connectionsearchPath - File(s) to search for, may include wildcards.attrib - Attributes of the file(s) to search for, see class SMBFileAttribute.java.io.FileNotFoundException - If the search could not be started.void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz) throws java.io.IOException
sess - Server sessiontree - Tree connectionfile - Network file detailssiz - New file lengthjava.io.IOException - The exception description.int writeFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws java.io.IOException
sess - Server sessiontree - Tree connectionfile - Network file detailsbuf - byte[] Data to be writtenbufoff - Offset within the buffer that the data startssiz - int Data lengthfileoff - Position within the file that the data is to be written.java.io.IOException - The exception description.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.