This commit is contained in:
dougt%netscape.com 2000-03-24 05:48:18 +00:00
Родитель ae30ecbdf8
Коммит fcb973ff92
1 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -1,6 +1,28 @@
const nsILocalFile = Components.interfaces.nsILocalFile;
var prefix = "";
function rename(source, newName)
{
try {
var sourceFile = Components.classes["component://mozilla/file/local"].
createInstance(nsILocalFile);
sourceFile.initWithPath(source);
}
catch (e) {
dump("Could not create nsILocalFile\n");
}
try {
sourceFile.copyTo(null, newName);
}
catch (e) {
dump("error coping" + e + "\n");
}
}
function cp(source, dest, followLinks, newName)
{
try {