Solved

Java file path help

Posted on 2015-02-16
2
180 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 26

Accepted Solution

by:
dpearson earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
json example 39 132
How can I   ajax html table  rows? 20 63
java jdbc batch example 8 22
servlet example issue 6 31
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now