public void ConfigTest1() { var props = new SharpCifs.Util.Sharpen.Properties(); props.SetProperty("jcifs.smb.client.username", this.UserName); props.SetProperty("jcifs.smb.client.password", this.Password); SharpCifs.Config.SetProperties(props); var uriString = $"smb://{this.ServerName}/FreeArea/SharpCifsTest/"; var dir = new SmbFile(uriString); Assert.IsTrue(dir.Exists()); var list = dir.ListFiles(); foreach (var file in list) { var name = file.GetName(); //Assert.IsTrue(name.IndexOf("filename") >= 0); var time = file.LastModified(); var dateteime = EpocDate.AddMilliseconds(time).ToLocalTime(); this.Out( $"Name: {file.GetName()}, isDir?: {file.IsDirectory()}, Date: {dateteime.ToString("yyyy-MM-dd HH:mm:ss")}"); } }