IOError — The directory did not exist and could not be created.
what causes this? i'm trying create directory in directory on desktop:
// "dir" existing directory on desktop
public function exportfiles(dir:file){
var file:file, fileto:file, dirto:file;
// fileinfo array of xml nodes metadata files stored in applicationstoragedirectory
each(var f:xml in fileinfo){
file = file.applicationstoragedirectory.resolvepath(f.filename);
if(file.exists){
fileto = dir.resolvepath(f.groupname + "/" + file.name);
dirto = fileto.parent;
dirto.createdirectory(); // ioerror -- why?
file.copyto(fileto,true);
}
}
}
// "dir" existing directory on desktop
public function exportfiles(dir:file){
var file:file, fileto:file, dirto:file;
// fileinfo array of xml nodes metadata files stored in applicationstoragedirectory
each(var f:xml in fileinfo){
file = file.applicationstoragedirectory.resolvepath(f.filename);
if(file.exists){
fileto = dir.resolvepath(f.groupname + "/" + file.name);
dirto = fileto.parent;
dirto.createdirectory(); // ioerror -- why?
file.copyto(fileto,true);
}
}
}
okay, problem groupname null.
More discussions in Archived Spaces
adobe
Comments
Post a Comment