Example #1
0
        static void AddNewFile()
        {
            var fileTypes = FileTypeInput.GetFileTypes("Enter file types for new file: ");
            var isValidFile = FileTypeInput.IsFileInputValid(fileTypes);
            if (!isValidFile)
            {
                return;
            }

            _file = new FileDescription("c:\\documents\\doc.txt", fileTypes);
        }
Example #2
0
        public static void Process(FileDescription file)
        {
            var fileTypeText = PrintFileType(file.FileType);
            Console.WriteLine(fileTypeText); 

            if (IsCompressesFile(file.FileType))
            {
                Console.WriteLine("Compressing " + file.Filename);
            }

            if (file.FileType.HasFlag(FileType.Readonly))
            {
                Console.WriteLine("Cannot override file");
            }
        }