AdvancedLauncher.SDK.Management.FileSystemManager.WriteFile C# (CSharp) Метод

WriteFile() публичный Метод

Writes file to archive.
public WriteFile ( string sourceFile, string destination ) : bool
sourceFile string Source file (physical on the disk)
destination string Destination file (internal file path inside archive)
Результат bool
        public bool WriteFile(string sourceFile, string destination)
        {
            if (LogManager != null) {
                LogManager.DebugFormat("Writing file: sourceFile=\"{0}\", destination=\"{1}\"", sourceFile, destination);
            }
            if (!File.Exists(sourceFile)) {
                if (LogManager != null) {
                    LogManager.ErrorFormat("Writing file failed: sourceFile=\"{0}\" not found", sourceFile);
                }
                return false;
            }
            FileStream sourceStream = new FileStream(sourceFile, FileMode.Open, FileAccess.Read);
            return WriteStream(sourceStream, destination);
        }