|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.jcifs.CifsDiskContext
CifsDiskContext
is a helper class. The JCIFS runtime does not use it.
You can use the class to save user specific data and to implement
the current directory concept.
After connecting to disk, you can create a CifsDiskContext
object and
save it as a property:
CifsDisk disk; .... CifsDiskContext ctxt = new CifsDiskContext(disk); disk.setProperty("mycontext",ctxt);Whenever you need the context object:
CifsDiskContext ctxt = (CifsDiskContext)disk.getProperty("mycontext");
CifsSession.setProperty(java.lang.String, java.lang.Object)
,
CifsSession.getProperty(java.lang.String)
Constructor Summary | |
CifsDiskContext(CifsDisk disk)
Creates a new context object |
Method Summary | |
void |
changeCurrentDir(java.lang.String newdir)
Changes current directory. |
java.lang.String |
getCurrentDir()
Returns the current directory (relative to share) |
CifsDisk |
getDisk()
Returns the corresponding disk object |
java.lang.String |
getPathName(java.lang.String file)
Returns the path name: If the file starts with \ (or) /, the pathname=filename, otherwise pathname = current-dir/filename |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public CifsDiskContext(CifsDisk disk)
disk
- disk objectMethod Detail |
public final java.lang.String getCurrentDir()
public final void changeCurrentDir(java.lang.String newdir) throws java.io.IOException
newdir
- new directory namejava.io.IOException
- if directory does not existspublic final java.lang.String getPathName(java.lang.String file)
file
- file namepublic CifsDisk getDisk()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |