Skip to content

Commit b9d406f

Browse files
Merge pull request #11768 from dotnet/main
Merge main into live
2 parents f2d057e + 3d116df commit b9d406f

File tree

1 file changed

+1
-0
lines changed
  • includes/remarks/System.IO.Compression/ZipArchiveEntry

1 file changed

+1
-0
lines changed

includes/remarks/System.IO.Compression/ZipArchiveEntry/Name.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
The <xref:System.IO.Compression.ZipArchiveEntry.Name%2A> property contains the portion of the <xref:System.IO.Compression.ZipArchiveEntry.FullName%2A> property that follows the final directory separator character (\\), and does not include the subdirectory hierarchy. For example, if you create two entries in a zip archive by using the <xref:System.IO.Compression.ZipFileExtensions.CreateEntryFromFile%2A> method and provide `NewEntry.txt` as the name for the first entry and `AddedFolder\\NewEntry.txt` for the second entry, both entries will have `NewEntry.txt` in the <xref:System.IO.Compression.ZipArchiveEntry.Name%2A> property. The first entry will also have `NewEntry.txt` in the <xref:System.IO.Compression.ZipArchiveEntry.FullName%2A> property, but the second entry will have `AddedFolder\\NewEntry.txt` in the <xref:System.IO.Compression.ZipArchiveEntry.FullName%2A> property.
2+
On Windows, colons (`:`) are also treated as separators due to NTFS rules, which can cause <xref:System.IO.Compression.ZipArchiveEntry.Name%2A> to differ across platforms. For platform-independent behavior, you can use <xref:System.IO.Compression.ZipArchiveEntry.FullName%2A>, which always reflects the complete entry name as stored in the archive.
23

34
## Examples
45

0 commit comments

Comments
 (0)