Example #1
0
        public void DeleteShortNameDir()
        {
            NtfsFileSystem ntfs = FileSystemSource.NtfsFileSystem();

            ntfs.CreateDirectory(@"\TestLongName1\TestLongName2");
            ntfs.SetShortName(@"\TestLongName1\TestLongName2", "TESTLO~1");

            Assert.True(ntfs.DirectoryExists(@"\TestLongName1\TESTLO~1"));
            Assert.True(ntfs.DirectoryExists(@"\TestLongName1\TestLongName2"));

            ntfs.DeleteDirectory(@"\TestLongName1", true);

            Assert.False(ntfs.DirectoryExists(@"\TestLongName1"));
        }