Solved

Java file path help

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services vs rest web services 16 105
diffSum example 4 37
Windows 10 IE Certificate Issue 10 45
how to install java on RHEL image on EC2 4 27
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

773 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