Trying to use PSUtilities listFiles

and I’m getting this error:

Specified path is not on the read allowed list in the PSUtilities configuration file!

Configuration file? Has anyone envountered this or does anyone know anything about this?

Thanks,
Harry

Harry,

Basically update this file located in the packages/PSUtilities/config file and set
allowedReadPaths specify directory path that to read files and save it and reload the PSUtilities package.

Run the service with the readpath directory it should show you list of Files.

HTH,
RMG

Sigh. Find and read the documentation on the PSUtilities sample utilites on Advantage.

I need to do something like “ls /myfolder/*.dat”? The Java API talks of java.io.FilenameFilter. Could I define a class within my java service which extends this interface and then feed it to File.listFiles()? Or is there another better way of accomplishing the above. Thanks for your help.

Thats how I’m going about it … defining an inline java class that implements the FilenameFilter interface.


filter = new FilenameFilter() {
public boolean accept(File dir, String filename) {
return (filename.indexOf(filterString) != -1);
}
};

File file = new File(directoryPath);

file.list(filter)