Пример #1
0
        protected void DeleteTestFileSystem()
        {
            if (!BaseDir.Exists())
            {
                return;
            }

            // TODO: add support for handling readonly files/dirs to NiceIO

            foreach (var path in BaseDir
                     .Contents(true)
                     .Where(f => (File.GetAttributes(f) & FileAttributes.ReadOnly) != 0))
            {
                File.SetAttributes(path, File.GetAttributes(path) & ~FileAttributes.ReadOnly);
            }

            BaseDir.Delete();
        }