Solved

Java file path help

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

744 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

12 Experts available now in Live!

Get 1:1 Help Now