[s3metadata] extract to file

This commit is contained in:
Paul Campbell 2019-05-07 17:52:40 +01:00
parent 9d3c124b6e
commit 6eab5ada1e
3 changed files with 8 additions and 7 deletions

View file

@ -0,0 +1,8 @@
package net.kemitix.s3thorp
import net.kemitix.s3thorp.Sync.{Hash, LastModified, LocalPath, RemotePath}
case class S3MetaData(localPath: LocalPath,
remotePath: RemotePath,
remoteHash: Hash,
remoteLastModified: LastModified)

View file

@ -4,7 +4,6 @@ import java.nio.file.Path
import java.time.Instant
import fs2.Stream
import cats.effect.IO
import net.kemitix.s3thorp.Sync.S3MetaData
import Main.putStrLn
trait S3MetaDataEnricher {

View file

@ -7,7 +7,6 @@ import cats.effect._
import fs2.Stream
import net.kemitix.s3thorp.Main.putStrLn
import scala.collection.JavaConverters._
import scala.concurrent.Promise
object Sync extends LocalFileStream with S3MetaDataEnricher {
@ -26,11 +25,6 @@ object Sync extends LocalFileStream with S3MetaDataEnricher {
type Hash = String // an MD5 hash
type LastModified = Instant // or scala equivalent
case class S3MetaData(localPath: LocalPath,
remotePath: RemotePath,
remoteHash: Hash,
remoteLastModified: LastModified)
private def uploadRequiredFilter: S3MetaData => Stream[IO, Path] = s3Metadata => Stream.eval(for {
_ <- putStrLn(s"upload required: ${s3Metadata.localPath}")
//md5File(localFile)