Exemple #1
0
        public void AddFile(string filePath)
        {
            string destinationPath;

            if (filePath.StartsWith(Paths.BinaryRootPath)) {
                // Add file paths relative to the installation.
                destinationPath = filePath.Substring(Paths.BinaryRootPath.Length + 1);
            }
            else {
                // Anything not sourced from Modules goes into the target root.
                // (Currently only UserData.xml)
                destinationPath = Path.GetFileName(filePath);
            }

            NewContextFile contextFile = new NewContextFile(filePath, destinationPath);
            AddFile(contextFile);
        }
Exemple #2
0
        public void AddFile(string filePath)
        {
            string destinationPath;

            if (filePath.StartsWith(Paths.BinaryRootPath))
            {
                // Add file paths relative to the installation.
                destinationPath = filePath.Substring(Paths.BinaryRootPath.Length + 1);
            }
            else
            {
                // Anything not sourced from Modules goes into the target root.
                // (Currently only UserData.xml)
                destinationPath = Path.GetFileName(filePath);
            }

            NewContextFile contextFile = new NewContextFile(filePath, destinationPath);

            AddFile(contextFile);
        }