'filetypes' renamed to 'fileformats' in libamalthea

parent d536d93b
......@@ -22,6 +22,8 @@ import
module_RPN,
module_create;
import amalthea.fileformats;
public alias moduleAssign = module_assign;
alias vpath = getVitisPath;
......@@ -710,11 +712,10 @@ private string[] defineAutoCategoriesPaths(string filepath) {
}
if (modes.canFind("format")) {
import amalthea.filetypes;
auto fileType = amalthea.filetypes.getFileType(filepath);
auto fileType = amalthea.fileformats.getFileFormat(filepath);
paths ~= getFormatCategoryPath() ~ fileType.format ~ "/";
if (!fileType.category.empty)
paths ~= getTypeCategoryPath() ~ fileType.category ~ "/";
if (!fileType.group.empty)
paths ~= getTypeCategoryPath() ~ fileType.group ~ "/";
}
if (modes.canFind("extension")) {
string ext = filepath.extension;
......
......@@ -22,6 +22,7 @@ public alias moduleService = module_service;
import module_vitis_base;
import module_help;
import amalthea.fileformats;
void mainFn(string[] args) {
cmdService(args);
......@@ -316,7 +317,6 @@ bool checkForAutoCategory(string linkpath, string filepath) {
}
void checkFileFormats(string category = "") {
import amalthea.filetypes;
string[string] allLinks;
if (category.empty) {
allLinks = getAllLinks();
......@@ -327,7 +327,7 @@ void checkFileFormats(string category = "") {
}
foreach(linkpath, filepath; allLinks) {
if (checkForAutoCategory(linkpath, filepath)) continue;
auto fileType = amalthea.filetypes.getFileType(filepath);
auto fileType = amalthea.fileformats.getFileFormat(filepath);
auto formatCatPath = getFormatCategoryPath ~ fileType.format ~ "/";
mkdirRecurse(formatCatPath);
auto linksOfFormatCategory = getSymlinksInfo(formatCatPath);
......@@ -353,7 +353,7 @@ void checkFileFormats(string category = "") {
symlink(filepath, formatCatPath ~ linkpath.baseName);
}
auto typeCatPath = getTypeCategoryPath ~ fileType.category ~ "/";
auto typeCatPath = getTypeCategoryPath ~ fileType.group ~ "/";
mkdirRecurse(typeCatPath);
auto linksOfTypeCategory = getSymlinksInfo(typeCatPath);
bool typeIsCorrect = false;
......@@ -372,7 +372,7 @@ void checkFileFormats(string category = "") {
}
//we create new link in new type category
auto w = ": this file is assigned new type category";
auto typeCategory = "Type/" ~ fileType.category;
auto typeCategory = "Type/" ~ fileType.group;
auto msg = format("%s %s (%s).", linkpath, w, typeCategory);
"warning".tprintln(msg);
symlink(filepath, typeCatPath ~ linkpath.baseName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment