AcManager.Tools.ContentInstallation.ContentInstallation.IsZipArchive C# (CSharp) Method

IsZipArchive() private static method

private static IsZipArchive ( string filename ) : bool
filename string
return bool
        private static bool IsZipArchive(string filename) {
            try {
                using (var fs = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) {
                    var bytes = new byte[4];
                    fs.Read(bytes, 0, 4);
                    return BitConverter.ToInt32(bytes, 0) == ZipLeadBytes;
                }
            } catch (Exception e) {
                Logging.Warning("IsZipArchive(): " + e);
                return false;
            }
        }
    }
ContentInstallation