SharpCifs.Smb.SmbFile.ListFiles C# (CSharp) Method

ListFiles() public method

List the contents of this SMB resource as an array of SmbFile objects.
List the contents of this SMB resource as an array of SmbFile objects. This method is much more efficient than the regular list method when querying attributes of each file in the result set.

The list of SmbFiles returned by this method will be;

  • files and directories contained within this resource if the resource is a normal disk file directory,
  • all available NetBIOS workgroups or domains if this resource is the top level URL smb://,
  • all servers registered as members of a NetBIOS workgroup if this resource refers to a workgroup in a smb://workgroup/ URL,
  • all browseable shares of a server including printers, IPC services, or disk volumes if this resource is a server URL in the form smb://server/,
  • or null if the resource cannot be resolved.
public ListFiles ( ) : SmbFile[]
return SmbFile[]
        public virtual SmbFile[] ListFiles()
        {
            return ListFiles("*", AttrDirectory | AttrHidden | AttrSystem, null, null);
        }

Same methods

SmbFile::ListFiles ( ISmbFileFilter filter ) : SmbFile[]
SmbFile::ListFiles ( ISmbFilenameFilter filter ) : SmbFile[]
SmbFile::ListFiles ( string wildcard ) : SmbFile[]
SmbFile::ListFiles ( string wildcard, int searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff ) : SmbFile[]