コード例 #1
0
        public static void CopyTo(this CppSourceSpan cppSpan, Config config)
        {
            var dst = Path.Combine(config.DstDir, "thirdparty", config.BaseSourceFolder, cppSpan.FolderFromBaseSrcFolder(config.BaseSourceFolder));

            // we could have a header outside of our BaseSourceFolder. in that case stick it in a folder in thirdparty
            if (cppSpan.FilePath().IndexOf(config.BaseSourceFolder) == -1)
            {
                dst = Path.Combine(config.DstDir, "thirdparty", cppSpan.FolderFromBaseSrcFolder(config.BaseSourceFolder));
            }
            Directory.CreateDirectory(dst);

            File.Copy(cppSpan.FilePath(), Path.Combine(dst, cppSpan.Filename()), true);
        }
コード例 #2
0
 public static string FilenameNoExtension(this CppSourceSpan cppSpan)
 {
     return(cppSpan.Filename().Replace(".h", ""));
 }