SIL.FieldWorks.UnicodeCharEditor.PUAInstaller.CreateXxFile C# (CSharp) Méthode

CreateXxFile() private static méthode

This method will create the temporary work file copy of the original input file.
private static CreateXxFile ( string inputFilespec, string suffix ) : string
inputFilespec string This is the file to make a copy of.
suffix string
Résultat string
		private static string CreateXxFile(string inputFilespec, string suffix)
		{
			string outputFilespec = CreateNewFileName(inputFilespec, suffix);
			try
			{
				if (!File.Exists(inputFilespec))
				{
					// Have to save the handle in an object so that we can close it!
					using (FileStream fs = File.Create(outputFilespec))
						fs.Close();
				}
				else
				{
					FileCopyWithLogging(inputFilespec, outputFilespec, true);
				}
			}
			catch
			{
				LogFile.AddErrorLine("Error creating file with suffix: " + suffix + " from: " + inputFilespec);
				throw;
			}
			return outputFilespec;
		}