Exemple #1
0
        private string RemoveExtension(string filePath)
        {
            var pathSafe             = new PathWrapSafe();
            var directory            = pathSafe.GetDirectoryName(filePath);
            var fileWithoutExtension = pathSafe.GetFileNameWithoutExtension(filePath);

            return(Path.Combine(directory, fileWithoutExtension));
        }
        private void AddTokensForDocumentTitle(SourceFileInfo sfi, Metadata metadata)
        {
            var titleFilename = "";
            var titleFolder   = "";

            if (_pathUtil.IsValidRootedPath(sfi.DocumentTitle))
            {
                titleFilename = _pathWrapSafe.GetFileNameWithoutExtension(sfi.DocumentTitle);
                titleFolder   = _pathWrapSafe.GetDirectoryName(sfi.DocumentTitle);
            }
            else
            {
                titleFilename = metadata.PrintJobName;
            }

            _tokenReplacer.AddStringToken("InputFilename", titleFilename);
            _tokenReplacer.AddStringToken("InputFilePath", titleFolder);
        }