creating folders with java?
Results 1 to 5 of 5

Thread: creating folders with java?

  1. #1
    Member
    Join Date
    Aug 2002
    Posts
    51

    creating folders with java?

    how do u creat folders with java?

  2. #2
    T̙͓̞̣̯ͦͭͅͅȂͧͭͧ̏̈͏̖̖Z̿ ͆̎̄
    Join Date
    Dec 2004
    Posts
    3,171
    mad_fox9007,

    Try this, I hope it helps...

    http://help.eclipse.org/help30/index...s/tasks-14.htm
    Help - Eclipse Platform

    http://help.eclipse.org/help30/index...ce/ref-152.htm
    Help - Eclipse Platform

    Eg

  3. #3
    AntiOnline n00b
    Join Date
    Feb 2004
    Posts
    665
    Hi,

    how do u creat folders with java?
    You mean this ? ...............

    Code:
    import java.io.*;
    
    class DirTest
    {
    	public static void main(String args[])
    	{
    	 	boolean succ = (new File("Dirname")).mkdir();
    
    		if (!succ) 
    		{
            		System.out.println("Creation failed");
        		}
       		
    		else System.out.println("Created");
    	}
       
    }

    --Good Luck--

  4. #4
    Senior Member
    Join Date
    May 2003
    Posts
    226
    Code:
        // Create a directory; all ancestor directories must exist
        boolean success = (new File("directoryName")).mkdir();
        if (!success) {
            // Directory creation failed
        }
        
        // Create a directory; all non-existent ancestor directories are
        // automatically created
        success = (new File("directoryName")).mkdirs();
        if (!success) {
            // Directory creation failed
        }
    Reference url: http://javaalmanac.com/egs/java.io/CreateDir.html

  5. #5
    Member
    Join Date
    Aug 2002
    Posts
    51
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides