Package com.sshtools.vfs.smbng
Class SmbFileObject
- java.lang.Object
-
- org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
-
- com.sshtools.vfs.smbng.SmbFileObject
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<org.apache.commons.vfs2.FileObject>,Iterable<org.apache.commons.vfs2.FileObject>,org.apache.commons.vfs2.FileObject
public class SmbFileObject extends org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
A file in an SMB file system.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSmbFileObject(org.apache.commons.vfs2.provider.AbstractFileName name, SmbFileSystem fileSystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoAttach()Attaches this file object to its file resource.protected voiddoCreateFolder()Creates this file as a folder.protected voiddoDelete()Deletes the file.protected voiddoDetach()protected longdoGetContentSize()Returns the size of the file content (in bytes).protected InputStreamdoGetInputStream()Creates an input stream to read the file content from.protected longdoGetLastModifiedTime()Returns the last modified time of this file.protected OutputStreamdoGetOutputStream(boolean bAppend)Creates an output stream to write the file content to.protected org.apache.commons.vfs2.RandomAccessContentdoGetRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode mode)random accessprotected org.apache.commons.vfs2.FileTypedoGetType()Determines the type of the file, returns null if the file does not exist.protected booleandoIsHidden()Determines if this file is hidden.protected String[]doListChildren()Lists the children of the file.protected voiddoRename(org.apache.commons.vfs2.FileObject newfile)protected booleandoSetLastModifiedTime(long modtime)-
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
canRenameTo, childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doCreateFileContent, doGetAttributes, doGetCertificates, doGetInputStream, doIsExecutable, doIsReadable, doIsSameFile, doIsSymbolicLink, doIsWriteable, doListChildrenResolved, doRemoveAttribute, doSetAttribute, doSetExecutable, doSetReadable, doSetWritable, endOutput, exists, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, isWriteable, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toString
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
SmbFileObject
protected SmbFileObject(org.apache.commons.vfs2.provider.AbstractFileName name, SmbFileSystem fileSystem) throws org.apache.commons.vfs2.FileSystemException- Throws:
org.apache.commons.vfs2.FileSystemException
-
-
Method Detail
-
doAttach
protected void doAttach() throws ExceptionAttaches this file object to its file resource.- Overrides:
doAttachin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doDetach
protected void doDetach() throws Exception- Overrides:
doDetachin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetType
protected org.apache.commons.vfs2.FileType doGetType() throws ExceptionDetermines the type of the file, returns null if the file does not exist.- Specified by:
doGetTypein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doListChildren
protected String[] doListChildren() throws Exception
Lists the children of the file. Is only called ifdoGetType()returnsFileType.FOLDER.- Specified by:
doListChildrenin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doIsHidden
protected boolean doIsHidden() throws ExceptionDetermines if this file is hidden.- Overrides:
doIsHiddenin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doDelete
protected void doDelete() throws ExceptionDeletes the file.- Overrides:
doDeletein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doRename
protected void doRename(org.apache.commons.vfs2.FileObject newfile) throws Exception- Overrides:
doRenamein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doCreateFolder
protected void doCreateFolder() throws ExceptionCreates this file as a folder.- Overrides:
doCreateFolderin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetContentSize
protected long doGetContentSize() throws ExceptionReturns the size of the file content (in bytes).- Specified by:
doGetContentSizein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetLastModifiedTime
protected long doGetLastModifiedTime() throws ExceptionReturns the last modified time of this file.- Overrides:
doGetLastModifiedTimein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetInputStream
protected InputStream doGetInputStream() throws Exception
Creates an input stream to read the file content from.- Overrides:
doGetInputStreamin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetOutputStream
protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
Creates an output stream to write the file content to.- Overrides:
doGetOutputStreamin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doGetRandomAccessContent
protected org.apache.commons.vfs2.RandomAccessContent doGetRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode mode) throws Exceptionrandom access- Overrides:
doGetRandomAccessContentin classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
doSetLastModifiedTime
protected boolean doSetLastModifiedTime(long modtime) throws Exception- Overrides:
doSetLastModifiedTimein classorg.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>- Throws:
Exception
-
-