Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logfn from Compress and Extract #1624

Merged
merged 1 commit into from
Aug 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/app/FakeLib/ArchiveHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ let private addEntry prepareEntry afterEntry (outStream : #Stream) { InputFile =
use inStream = inFile.OpenRead()
let entryName = prepareEntry inFile entryPath
copyFileBuffered DefaultBufferSize outStream inStream
logfn "Compressed %s => %s" inFile.FullName entryName
afterEntry outStream

let private extractEntry (inStream : #Stream) entry =
entry.OutputFile.Directory |> ensureDirExists
use outStream = entry.OutputFile.Create()
copyStreamBuffered DefaultBufferSize outStream inStream entry.EntrySize
logfn "Extracted %s => %s" entry.ArchiveEntryPath entry.OutputFile.FullName

let private createArchiveStream (streamCreator : Stream -> #Stream) (archiveFile : FileInfo) =
archiveFile.Create() :> Stream
Expand Down Expand Up @@ -516,4 +514,4 @@ module Tar =
/// - `baseDir` - The base directory to be compressed. This directory will be the root of the resulting archive.
/// - `archiveFile` - The output archive file. If existing, will be overwritten.
let CompressDirWithDefaults (baseDir : DirectoryInfo) archiveFile =
allFilesInDirectory baseDir |> CompressWithDefaults baseDir archiveFile
allFilesInDirectory baseDir |> CompressWithDefaults baseDir archiveFile