Ejemplo n.º 1
0
        public void DeleteAlternateDataStreams()
        {
            NtfsFileSystem ntfs = FileSystemSource.NtfsFileSystem();

            ntfs.OpenFile("AFILE.TXT", FileMode.Create).Dispose();
            ntfs.OpenFile("AFILE.TXT:ALTSTREAM", FileMode.Create).Dispose();
            Assert.Equal(1, ntfs.GetAlternateDataStreams("AFILE.TXT").Length);

            ntfs.DeleteFile("AFILE.TXT:ALTSTREAM");
            Assert.Equal(1, ntfs.GetFileSystemEntries("").Length);
            Assert.Equal(0, ntfs.GetAlternateDataStreams("AFILE.TXT").Length);
        }