Helpers

coursemgmt.Helpers
object Helpers

Attributes

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

Members list

Type members

Classlikes

final case class ExercisesMetadata(exercisePrefix: String, exercises: Vector[String], exerciseNumbers: Vector[Int])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def adaptToNixSeparatorChar(path: String): String
def adaptToOSSeparatorChar(path: String): String
def addFirstExercise(cleanedMainRepo: File, firstExercise: String, studentifiedRootFolder: File)(config: CMTaConfig): Unit
def checkpreExistingAndCreateArtifactRepo(artifactBaseDirectory: File, artifactRootFolder: File, forceDeleteDestinationDirectory: Boolean): Either[CmtError, String]
def commitToGit(commitMessage: String, projectFolder: File): Either[CmtError, Unit]
def copyCleanViaGit(mainRepo: File, tmpDir: File, repoName: String): Either[CmtError, Unit]
def deleteFileIfExists(file: File): Unit
def dumpStringToFile(string: String, file: File): Unit
def exerciseFileHasBeenModified(activeExerciseFolder: File, file: String, fileMetadata: Map[String, FileMetadata]): Boolean
def exitIfGitIndexOrWorkspaceIsntClean(mainRepo: File): Either[CmtError, Unit]
def extractExerciseNr(exercise: String): Int
def extractUniquePaths(paths: Seq[String]): (Seq[String], Seq[String])
def fileList(base: File): Vector[File]
def fileSha256Hex(f: File): String
def fileSize(f: File): Long
def findStudentRepoRoot(path: File): Either[CmtError, File]

Value parameters

Path

to either the root of a studentified repo or any subfolder in such repo

Attributes

Returns

The root folder of the studentified repo or an error message in case the passed-in fodler wasn't pointing to a studentified repo.

def getExerciseMetadata(mainRepo: File)(config: CMTaConfig): Either[CmtError, ExercisesMetadata]
def getFilesToCopyAndDelete(currentExerciseId: String, toExerciseId: String, config: CMTcConfig): (Set[String], Set[String], Set[String])
def hideExercises(cleanedMainRepo: File, solutionsFolder: File, exercises: Vector[String])(config: CMTaConfig): Unit
def initializeGitRepo(linearizedProject: File): Either[CmtError, Unit]
def listExercises(config: CMTcConfig): String
def pullTestCode(toExerciseId: String, activeExerciseFolder: File, filesToBeDeleted: Set[String], filesToBeCopied: Set[String], config: CMTcConfig): Either[CmtError, String]
def resolveMainRepoPath(mainRepo: File): Either[CmtError, File]
def setGitConfig(linearizedProject: File): Either[CmtError, Unit]
def validatePrefixes(prefixes: Set[String]): Unit
def withZipFile(solutionsFolder: File, exerciseID: String)(code: File => Either[CmtError, String]): Either[CmtError, String]
def writeCodeMetadata(cleanedMainRepo: File, exercises: Vector[String], studentifiedRootFolder: File, cmtaConfig: CMTaConfig): Unit
def writeStudentifiedCMTBookmark(bookmarkFile: File, firstExercise: String): Unit
def writeStudentifiedCMTConfig(configFile: File, exercises: Seq[String])(config: CMTaConfig, generatorInfo: GeneratorInfo): Unit
def writeTestReadmeCodeMetadata(cleanedMainRepo: File, exercises: Vector[String], studentifiedRootFolder: File, cmtaConfig: CMTaConfig): Unit
def zipAndDeleteOriginal(baseFolder: File, zipToFolder: File, exercise: String, time: Option[Long]): Unit

Concrete fields

val ignoreProcessStdOutStdErr: ProcessLogger

Extensions

Extensions

extension (f: File)
def getParentOrSelf: File