public void Test_ListPath_Without_Stat() { var localPath = this.Fixture.CreateFile("foo"); var localFileName = Path.GetFileName(localPath); var remotePath = "/" + localFileName; this.Client.MakeFile(localPath, remotePath); var listResults = this.Client.ListPath("/", 100, null, false); ListPathFileResult foundResult = null; foreach (var file in listResults.Files) { if (file.Name == localFileName) { foundResult = file; } } Assert.AreEqual(localFileName, foundResult.Name); Assert.AreEqual(0, foundResult.Ctime); Assert.AreEqual(0, foundResult.Mtime); Assert.AreEqual(0, foundResult.Gid); Assert.AreEqual(0, foundResult.Uid); Assert.IsNull(foundResult.Checksum); Assert.AreEqual(0, foundResult.Size); Assert.AreEqual(0, foundResult.ContentType); this.Client.DeleteFile(remotePath); }
public void Test_ListPath_Success() { var localPath = this.Fixture.CreateFile("foo"); var localFileName = Path.GetFileName(localPath);; var remotePath = "/" + localFileName; this.Client.MakeFile(localPath, remotePath); var listResults = this.Client.ListPath("/", 100, null, true); ListPathFileResult foundResult = null; foreach (var file in listResults.Files) { if (file.Name == localFileName) { foundResult = file; } } Assert.AreEqual(localFileName, foundResult.Name); Assert.IsTrue(foundResult.Ctime > 0); Assert.IsTrue(foundResult.Mtime > 0); Assert.IsTrue(foundResult.Gid > 0); Assert.IsTrue(foundResult.Uid > 0); Assert.AreEqual(3, foundResult.Size); Assert.IsNotNull(foundResult.Checksum); this.Client.DeleteFile(remotePath); }