Question

5
Replies
4848
Views
Akash Vibhute (Akash)
Vodafone
Senior Engineer
Vodafone
IN
Akash Member since 2017 12 posts
Vodafone
Posted: November 30, 2017
Last activity: December 28, 2017
Posted: 30 Nov 2017 9:42 EST
Last activity: 28 Dec 2017 2:21 EST
Closed
Solved

Reading file from external shared location

I am trying to read file from a shared location. The filepath is a UNC- "\\server\folder\file.xml".

I need to read this in java code.

Our Pega server is installed on linux. So I converted the \ to /.

When I use the PRFile api, and provide filepath as "file://server/folder/file.xml", file.exists() returns false and

file.getAbsolutePath() returns "file://default:/server/folder/file.xml".

Passing fileName without "file://" returns the same thing.

So I tried java.io.File. to this I passed URI(filePath) but I am still getting the same results, absoluteFilePath is /server/folder/file.xml and .exists() returns false.

I can access the files in eclipse on my windows machine with java File class.

Can anyone help with this?

Data Integration Java and Activities
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.