示例#1
0
        public static string FileDetailsCheck(string fileDetail, string filePath)
        {
            string fileResult = string.Empty;

            fileDetail = fileDetail.Trim();

            if (fileDetail == "-v" || fileDetail == "--v" || fileDetail == "/v" || fileDetail == "--version")
            {
                string fileVersion = new FileDetails().Version(filePath);
                fileResult = fileVersion;
            }

            if (fileDetail == "-s" || fileDetail == "--s" || fileDetail == "/s" || fileDetail == "--size")
            {
                int fileSize = new FileDetails().Size(filePath);
                fileResult = fileSize.ToString();
            }

            return(fileResult);
        }