Skip to content

Commit

Permalink
Edit |> to work on everything of FKFileType
Browse files Browse the repository at this point in the history
  • Loading branch information
nvzqz committed Sep 6, 2015
1 parent 57e7d85 commit 3ea22c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions FileKit/Core/FKOperators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ import Foundation
// MARK: - FKFileType

infix operator |> {}
infix operator <| {}

/// Writes a string to a text file.
/// Writes data to a file.
///
/// - Throws: `FKError.WriteToFileFail`
///
public func |> (data: String, file: FKTextFile) throws {
public func |> <FileType: FKFileType>(data: FileType.DataType, file: FileType) throws {
try file.write(data)
}

Expand Down

0 comments on commit 3ea22c5

Please sign in to comment.