PDA

View Full Version : Trying to use PSUtilities listFiles


hlamlin
04-07-2006, 13:46
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

rmg
04-07-2006, 13:54
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

mcarlson
04-07-2006, 14:02
Sigh. Find and read the documentation on the PSUtilities sample utilites on Advantage.

wms
04-07-2006, 16:39
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.

wms
04-10-2006, 12:20
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)

-------------------------------------------------------------------------