Skip to Content
0
Former Member
Feb 10, 2009 at 10:06 AM

does KM file exist ?

31 Views

Hi,

I would like to test if a km file exists but cannot make it work. I have the following code:

String numLiv = "http://<server>:<port>/irj/go/km/docs/MyRepository/myFile.pdf";
java.io.File myFile = new File(numLiv);
	if (myFile.isFile()) {
		wdContext.currentContextElement().setPath(numLiv);
		messageMgr.reportSuccess("Mon fichier existe !!");
	}

I have no idea what is wrong, I also tried with myFile.exists() but every time it returns false. Th efile do exist in my KM.

Thank you for your help.

Thibault Schalck