Loading...
Searching...
No Matches
score::FilePlacement Class Reference

Decides where each source file goes inside a project folder. More...

Detailed Description

Decides where each source file goes inside a project folder.

Two properties matter and are both enforced here:

  • a source referenced N times is placed once (the same destination comes back for every reference), and
  • two different sources never end up claiming the same destination, even when they share a file name, and even on a case-insensitive filesystem.

A destination that already holds a byte-identical file is reused instead of being duplicated, which is what makes running a consolidation twice a no-op.

Classes

struct  Placement
 

Public Member Functions

 FilePlacement (QString projectFolder, ConsolidateOptions opts={}) noexcept
 
Placement place (const QString &absoluteSource, FileKind kind, const std::vector< QString > &companions={})
 
const QString & projectFolder () const noexcept
 
const ConsolidateOptions & options () const noexcept
 

Member Function Documentation

◆ place()

FilePlacement::Placement score::FilePlacement::place ( const QString &  absoluteSource,
FileKind  kind,
const std::vector< QString > &  companions = {} 
)

companions are files the source names relative to its own folder (a drumkit's samples). Such a source gets a folder of its own, named after the one it comes from, where the companions keep their relative paths. An existing folder is only reused when the source and every companion found next to it are byte-identical to what it holds.


The documentation for this class was generated from the following files: