entry.WriteToDirectory #156

Closed
opened 2026-01-29 22:07:30 +00:00 by claunia · 2 comments
Owner

Originally created by @et721 on GitHub (Jan 16, 2017).

This method is missing?

Originally created by @et721 on GitHub (Jan 16, 2017). This method is missing?
Author
Owner

@aximili commented on GitHub (Feb 14, 2017):

I guess the extract RAR example here is wrong https://github.com/adamhathcock/sharpcompress/blob/master/USAGE.md

The Archive example here works:
https://sharpcompress.codeplex.com/wikipage?title=Composite%20API%20Examples

var archive = ArchiveFactory.Open(@"C:\Code\sharpcompress\TestArchives\sharpcompress.zip");
foreach (var entry in archive.Entries)
{
	if (!entry.IsDirectory)
	{
		Console.WriteLine(entry.FilePath);
		entry.WriteToDirectory(@"C:\temp", ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite);
	}
}
@aximili commented on GitHub (Feb 14, 2017): I guess the extract RAR example here is wrong https://github.com/adamhathcock/sharpcompress/blob/master/USAGE.md The Archive example here works: https://sharpcompress.codeplex.com/wikipage?title=Composite%20API%20Examples ``` var archive = ArchiveFactory.Open(@"C:\Code\sharpcompress\TestArchives\sharpcompress.zip"); foreach (var entry in archive.Entries) { if (!entry.IsDirectory) { Console.WriteLine(entry.FilePath); entry.WriteToDirectory(@"C:\temp", ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite); } } ```
Author
Owner

@adamhathcock commented on GitHub (Feb 14, 2017):

@Ethan872 It's only missing if you're on a platform that doesn't support File operations like phones.

@aximili no, that code sample is wrong unless you're on an old version.

@adamhathcock commented on GitHub (Feb 14, 2017): @Ethan872 It's only missing if you're on a platform that doesn't support File operations like phones. @aximili no, that code sample is wrong unless you're on an old version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#156