Example #1
0
        public void TestSetLastAccessTime()
        {
            var tempLongPathFilename = longPathDirectory.Combine(Pri.LongPath.Path.GetRandomFileName());

            tempLongPathFilename.CreateDirectory();

            try {
                var dateTime = DateTime.Now.AddDays(1);
                Directory.SetLastAccessTime(tempLongPathFilename, dateTime);
                var fi = new DirectoryInfo(tempLongPathFilename);
                Assert.AreEqual(fi.LastAccessTime, dateTime);
            }
            finally {
                Directory.Delete(tempLongPathFilename);
            }
        }