def relativePathToPiecesFolder(): fishlamp = searchForFishLampFolder(None); if fishlamp: Utils.assertPathExists(fishlamp); return fishlamp
def absolutePathToPiecesFolder(): fishlamp = relativePathToPiecesFolder(); if fishlamp: fishlamp = os.path.abspath(fishlamp); Utils.assertPathExists(fishlamp); return fishlamp;
def allPieces(): fishlamp = absolutePathToPiecesFolder(); Utils.verbose("found " + fishlamp) pieces = []; for filename in Utils.findFiles(fishlamp, pieceFileName()): Utils.assertPathExists(filename); piece = Piece(filename); pieces.append(piece); return pieces;
def subDirectoryPath(self, relativePathToPiecesFolder) : path = os.path.join(self.folderPath(), relativePathToPiecesFolder); return Utils.assertPathExists(path);
def templatePath(subDir) : return Utils.assertPathExists(os.path.join(os.path.join(scriptsPath(), "templates"), subDir));
def scriptsPath() : path = subprocess.check_output(["fishlamp", "scripts-path"]).strip(); Utils.assertPathExists(path); return path;