?
Solved

Java file path help

Posted on 2015-02-16
2
Medium Priority
?
225 Views
Last Modified: 2015-02-17
Hello there,

I have this code like this

storeHelper.process(new File("."), false);

Open in new window

and below is the description of that method.

public void process(File dropDirectory,
                    boolean isRecursive)
             throws TemplateStoreException,
                    IOException,
                    NoConvertersRunningException
Drop a whole directory of templates into the store optionally processing sub-directories.
Parameters:
dropDirectory - the directory to pick up documents from.
isRecursive - true to recursively drop sub-directories; false to only process the given directory.
Throws:
TemplateStoreException - if the underlying template store has an error
IOException - if an IO error occurs
NoConvertersRunningException - if there are no converters running

i want to know what does this File(".") do. i dont seem to get this.

cheers
zolf
0
Comment
Question by:zolf
2 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 2000 total points
ID: 40613680
In Linux "." is the current working directory - so File(".") is attempting to establish the path to the current directory.

E.g. If your current working directory is /usr/myfolder
then "." is "/usr/myfolder"
and ".." is the parent - or "/usr"

Does that make sense?

Doug
0
 

Author Closing Comment

by:zolf
ID: 40613840
thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question