public void CreateDirectory(CmdParser parser) { var fullPath = parser.GetAttribute("name") ?? parser.GetAttribute(0); try { fileManager.CreateDirectory(fullPath); Console.WriteLine("Success to mkdir {0} on {1}.", fullPath, fullPath.GetFilenameAndParent().parent.ToString()); } catch (Exception e) { Console.WriteLine("Failed to mkdir: {0}.", e.Message); } }