Class 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.
    • Field Summary

      • Fields inherited from class org.apache.commons.vfs2.provider.AbstractFileObject

        DEFAULT_BUFFER_SIZE
      • Fields inherited from interface org.apache.commons.vfs2.FileObject

        EMPTY_ARRAY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SmbFileObject​(org.apache.commons.vfs2.provider.AbstractFileName name, SmbFileSystem fileSystem)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doAttach()
      Attaches this file object to its file resource.
      protected void doCreateFolder()
      Creates this file as a folder.
      protected void doDelete()
      Deletes the file.
      protected void doDetach()  
      protected long doGetContentSize()
      Returns the size of the file content (in bytes).
      protected InputStream doGetInputStream()
      Creates an input stream to read the file content from.
      protected long doGetLastModifiedTime()
      Returns the last modified time of this file.
      protected OutputStream doGetOutputStream​(boolean bAppend)
      Creates an output stream to write the file content to.
      protected org.apache.commons.vfs2.RandomAccessContent doGetRandomAccessContent​(org.apache.commons.vfs2.util.RandomAccessMode mode)
      random access
      protected org.apache.commons.vfs2.FileType doGetType()
      Determines the type of the file, returns null if the file does not exist.
      protected boolean doIsHidden()
      Determines if this file is hidden.
      protected String[] doListChildren()
      Lists the children of the file.
      protected void doRename​(org.apache.commons.vfs2.FileObject newfile)  
      protected boolean doSetLastModifiedTime​(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 interface org.apache.commons.vfs2.FileObject

        getPath, getURI
    • 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 Exception
        Attaches this file object to its file resource.
        Overrides:
        doAttach in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doDetach

        protected void doDetach()
                         throws Exception
        Overrides:
        doDetach in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doGetType

        protected org.apache.commons.vfs2.FileType doGetType()
                                                      throws Exception
        Determines the type of the file, returns null if the file does not exist.
        Specified by:
        doGetType in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doListChildren

        protected String[] doListChildren()
                                   throws Exception
        Lists the children of the file. Is only called if doGetType() returns FileType.FOLDER.
        Specified by:
        doListChildren in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doIsHidden

        protected boolean doIsHidden()
                              throws Exception
        Determines if this file is hidden.
        Overrides:
        doIsHidden in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doDelete

        protected void doDelete()
                         throws Exception
        Deletes the file.
        Overrides:
        doDelete in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doRename

        protected void doRename​(org.apache.commons.vfs2.FileObject newfile)
                         throws Exception
        Overrides:
        doRename in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doCreateFolder

        protected void doCreateFolder()
                               throws Exception
        Creates this file as a folder.
        Overrides:
        doCreateFolder in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doGetContentSize

        protected long doGetContentSize()
                                 throws Exception
        Returns the size of the file content (in bytes).
        Specified by:
        doGetContentSize in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doGetLastModifiedTime

        protected long doGetLastModifiedTime()
                                      throws Exception
        Returns the last modified time of this file.
        Overrides:
        doGetLastModifiedTime in class org.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:
        doGetInputStream in class org.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:
        doGetOutputStream in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doGetRandomAccessContent

        protected org.apache.commons.vfs2.RandomAccessContent doGetRandomAccessContent​(org.apache.commons.vfs2.util.RandomAccessMode mode)
                                                                                throws Exception
        random access
        Overrides:
        doGetRandomAccessContent in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception
      • doSetLastModifiedTime

        protected boolean doSetLastModifiedTime​(long modtime)
                                         throws Exception
        Overrides:
        doSetLastModifiedTime in class org.apache.commons.vfs2.provider.AbstractFileObject<SmbFileSystem>
        Throws:
        Exception