1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 namespace System.IO.Compression 6 { 7 public partial class ZipArchiveEntry 8 { 9 internal const ZipVersionMadeByPlatform CurrentZipPlatform = ZipVersionMadeByPlatform.Unix; 10 11 /// <summary> 12 /// To get the file name of a ZipArchiveEntry, we should be parsing the FullName based 13 /// on the path specifications and requirements of the OS that ZipArchive was created on. 14 /// This method takes in a FullName and the platform of the ZipArchiveEntry and returns 15 /// the platform-correct file name. 16 /// </summary> 17 /// <remarks>This method ensures no validation on the paths. Invalid characters are allowed.</remarks> ParseFileName(string path, ZipVersionMadeByPlatform madeByPlatform)18 internal static string ParseFileName(string path, ZipVersionMadeByPlatform madeByPlatform) => 19 madeByPlatform == ZipVersionMadeByPlatform.Windows ? GetFileName_Windows(path) : GetFileName_Unix(path); 20 } 21 } 22