Sync

sbt.Sync
object Sync

Maintains a set of mappings so that they are uptodate. Specifically, 'apply' applies the mappings by creating target directories and copying source files to their destination. For each mapping no longer present, the old target is removed. Caution: Existing files are overwritten. Caution: The removal of old targets assumes that nothing else has written to or modified those files. It tries not to obliterate large amounts of data by only removing previously tracked files and empty directories. That is, it won't remove a directory with unknown (untracked) files in it. Warning: It is therefore inappropriate to use this with anything other than an automatically managed destination or a dedicated target directory. Warning: Specifically, don't mix this with a directory containing manually created files, like sources. It is safe to use for its intended purpose: copying resources to a class output directory.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Sync.type

Members list

Type members

Types

type RelationInfo[F] = (Relation[File, File], Map[File, F])
type RelationInfoVirtual[F] = (Relation[VirtualFileRef, VirtualFileRef], Map[VirtualFileRef, F])

Value members

Concrete methods

def convertFromVirtual[F <: FileInfo](info: (F), fileConverter: FileConverter): (F)
def copy(source: File, target: File): Unit
def noDuplicateTargets(relation: Relation[File, File]): Unit
def readInfo[F <: FileInfo](store: CacheStore)(implicit infoFormat: JsonFormat[F]): (F)
def readInfoVirtual[F <: FileInfo](store: CacheStore)(implicit infoFormat: JsonFormat[F]): (F)
def readInfoWrapped[F <: FileInfo](store: CacheStore, fileConverter: FileConverter)(implicit infoFormat: JsonFormat[F]): (F)
def sync(store: CacheStore, fileConverter: FileConverter): Iterable[(File, File)] => Relation[File, File]
def sync(store: CacheStore, inStyle: Style): Iterable[(File, File)] => Relation[File, File]
def sync(store: CacheStore, inStyle: Style, fileConverter: FileConverter): Iterable[(File, File)] => Relation[File, File]

this function ensures that the latest files in /src are also in /target, so that they are synchronised

this function ensures that the latest files in /src are also in /target, so that they are synchronised

Attributes

def writeInfo[F <: FileInfo](store: CacheStore, relation: Relation[File, File], info: Map[File, F])(implicit infoFormat: JsonFormat[F]): Unit
def writeInfoVirtual[F <: FileInfo](store: CacheStore, relation: Relation[File, File], info: Map[File, F], fileConverter: FileConverter)(implicit infoFormat: JsonFormat[F]): Unit

Deprecated methods

def apply(store: CacheStore, inStyle: Style, outStyle: Style): Iterable[(File, File)] => Relation[File, File]

Attributes

Deprecated
true

Implicits

Implicits

implicit def relationFormat[A, B](implicit af: JsonFormat[Map[A, Set[B]]], bf: JsonFormat[Map[B, Set[A]]]): JsonFormat[Relation[A, B]]