ResourceProvider fr = ResourcesImpl.getFileResourceProvider();
if(pathes!=null) {
String[] arr=ListUtil.toStringArrayEL(ListUtil.listToArray(pathes,File.pathSeparatorChar));
for(int i=0;i<arr.length;i++) {
if(arr[i].toLowerCase().indexOf("windows\\system")!=-1) {
Resource file = fr.getResource(arr[i]);
if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
}
}
for(int i=0;i<arr.length;i++) {
if(arr[i].toLowerCase().indexOf("windows")!=-1) {
Resource file = fr.getResource(arr[i]);
if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
}
}
for(int i=0;i<arr.length;i++) {
if(arr[i].toLowerCase().indexOf("winnt")!=-1) {
Resource file = fr.getResource(arr[i]);
if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
}
}
for(int i=0;i<arr.length;i++) {
if(arr[i].toLowerCase().indexOf("win")!=-1) {
Resource file = fr.getResource(arr[i]);
if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
}
}
for(int i=0;i<arr.length;i++) {
Resource file = fr.getResource(arr[i]);
if(file.exists() && file.isDirectory() && file.isWriteable()) return ResourceUtil.getCanonicalResourceEL(file);
}
}
return null;
}