Class SmbFileInfo

java.lang.Object
org.springframework.integration.file.remote.AbstractFileInfo<jcifs.smb.SmbFile>
org.springframework.integration.smb.session.SmbFileInfo
All Implemented Interfaces:
Comparable<FileInfo<jcifs.smb.SmbFile>>, FileInfo<jcifs.smb.SmbFile>

public class SmbFileInfo extends AbstractFileInfo<jcifs.smb.SmbFile>
An AbstractFileInfo implementation for SMB protocol.
Since:
6.0
Author:
Gregory Bragg, Artem Bilan
  • Constructor Details

    • SmbFileInfo

      public SmbFileInfo(jcifs.smb.SmbFile smbFile)
  • Method Details

    • isDirectory

      public boolean isDirectory()
      Returns:
      true if the remote file is a directory
    • isLink

      public boolean isLink()
      Symbolic links are currently not supported in the JCIFS v2.x.x dependent library, so this method will always return false.
      Returns:
      false
    • getSize

      public long getSize()
      Returns:
      the size of the remote file
    • getModified

      public long getModified()
      Returns:
      the modified time of the remote file
    • getFilename

      public String getFilename()
      Returns:
      the name of the remote file
    • getPermissions

      public String getPermissions()
      An Access Control Entry (ACE) is an element in a security descriptor such as those associated with files and directories. The Windows OS determines which users have the necessary permissions to access objects based on these entries. A readable, formatted list of security descriptor entries and associated permissions will be returned by this implementation.
       WNET\alice - Deny Write, Deny Modify, Direct - This folder only
       SYSTEM - Allow Read, Allow Write, Allow Modify, Allow Execute, Allow Delete, Inherited - This folder only
       WNET\alice - Allow Read, Allow Write, Allow Modify, Allow Execute, Allow Delete, Inherited - This folder only
       Administrators - Allow Read, Allow Write, Allow Modify, Allow Execute, Allow Delete, Inherited - This folder only
       
      Returns:
      a list of Access Control Entry (ACE) objects representing the security descriptor entry and permissions associated with this file or directory.
      See Also:
      • ACE
      • SID
    • getFileInfo

      public jcifs.smb.SmbFile getFileInfo()
      Returns:
      the actual implementation from the underlying library, more sophisticated access is needed.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractFileInfo<jcifs.smb.SmbFile>