logging - Reading File Direction/Path Java -


I want to read the path of a file I have found that all the class files are about how to read the file and how the file is saved in this direction.

But what I want is a way that shows me the path in such a way:

C: / User / Admin / Document / Netbusiness Project / HashemMap DOMO / Header template

so that I can save this direction in an XML file.

I hope it is understandable that what I mean, I can write something that anyone can understand.

I have tried:

  Kleinpath () {classloader ClassLoader = XmlLoader.class.getClassLoader (); File segment root = new file (classLoader.getResource (""). GetPath ()); Return squared Root.getPath (); }  

So far, but as I said, it does not give me the necessary information to me.

What is the method you are looking for?

get public stringAssolute path ()

The full pathname string of this abstract pathname.

If this abstract pathname is already full, then the pathname string is returned in the same way as the GetPath () method. If this abstract pathname is an empty abstract pathname then the pathname string of the current user directory, which is named by the system property user.dir, is back. Otherwise this pathname is resolved in a system-dependent manner. On UNIX systems, a relative pathname is accomplished by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname path is completed by resolving it against the current directory of the named drive, if any;

Returns: The full pathname string represents the same file or directory as this abstract pathname


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -