function getProfileDir() { return Services.dirsvc.get("ProfD", Ci.nsIFile);
}
// Given a "/"-delimited path relative to a base file (or the profile // directory if a base file is not provided) return an nsIFile representing the // path. This does not test for the existence of the file or parent // directories. It is safe even on Windows where the directory separator is // not "/", but make sure you're not passing in a "\"-delimited path. function getRelativeFile(relativePath, baseFile) { if (!baseFile) {
baseFile = getProfileDir();
}
let file = baseFile.clone();
if (Services.appinfo.OS === "WINNT") {
let winFile = file.QueryInterface(Ci.nsILocalFileWin);
winFile.useDOSDevicePathSyntax = true;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.