コード例 #1
0
ファイル: Program.cs プロジェクト: AonaSuzutsuki/ImageManager
        public void GetFiles(CmdParser parser)
        {
            var fullPath = parser.GetAttribute("name") ?? parser.GetAttribute(0);

            FileStructure[] fileStructures;
            if (fullPath.Substring(0, 1).Equals(":"))
            {
                var id = fullPath.TrimStart(':').ToInt();
                fileStructures = fileManager.GetFiles(id);
            }
            else
            {
                fileStructures = fileManager.GetFiles(fullPath);
            }

            foreach (var file in fileStructures)
            {
                Console.WriteLine("{0}", file);
            }
        }