Exemplo n.º 1
0
        public Stream OpenOutputWriteStream(string file)
        {
            var fullPath = Path.Combine(settings.OutDir, StringPathExtensions.TrimStartingPathChars(file));
            var fullDir  = Path.GetDirectoryName(fullPath);

            if (!Directory.Exists(fullDir))
            {
                Directory.CreateDirectory(fullDir);
            }
            return(File.Open(fullPath, FileMode.Create, FileAccess.Write, FileShare.None));
        }
Exemplo n.º 2
0
        public Stream OpenOutputParentWriteStream(string file)
        {
            var outDir = settings.OutDir;

            if (deploymentFolder != null)
            {
                //If using a deployment folder, get the parent folder.
                outDir = Path.GetDirectoryName(outDir);
            }
            var fullPath = Path.Combine(outDir, StringPathExtensions.TrimStartingPathChars(file));
            var fullDir  = Path.GetDirectoryName(fullPath);

            if (!Directory.Exists(fullDir))
            {
                Directory.CreateDirectory(fullDir);
            }
            return(File.Open(fullPath, FileMode.Create, FileAccess.Write, FileShare.None));
        }
Exemplo n.º 3
0
        public bool DoesOutputFileExist(String file)
        {
            var fullPath = Path.Combine(settings.OutDir, StringPathExtensions.TrimStartingPathChars(file));

            return(File.Exists(fullPath));
        }