Exemplo n.º 1
0
 private string GetFilePath(string filePath, string foldername, bool overwrite)
 {
     foldername = this.GetFolderName(foldername);
     filePath   = Path.Combine(foldername, filePath);
     if (!overwrite)
     {
         filePath = IOUtils.CheclFileExistsAndReturnNewFilename(filePath);
     }
     return(filePath);
 }
Exemplo n.º 2
0
        /// <summary>
        /// ファイルのパスを取得する
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="folderpath"></param>
        /// <returns></returns>
        private string GetFilePath(string filename, string folderpath, bool overwrite = false)
        {
            string mp4Foldername = this.GetFolderPath(folderpath);
            string path          = Path.Combine(mp4Foldername, filename);

            if (!overwrite)
            {
                path = IOUtils.CheclFileExistsAndReturnNewFilename(path);
            }

            return(path);
        }
Exemplo n.º 3
0
        public void ファイル上書きの挙動(string input, string expected)
        {
            string newPath = IOUtils.CheclFileExistsAndReturnNewFilename(input, true);

            Assert.AreEqual(expected, newPath);
        }