• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic files  RSS feed

 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement where in I need to create the directory and a file under it dynamically.
my initial path is c:\project
lets say an user u1 logs in ...then i need to create a file under

c:\project\u1\u1.ser

if u2 logs in ....then its
c:\project\u2\u2.ser

How do i do this

Thx in advance
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part do you need help with? The java.io.File class has methods to create and list directories, and you can create a file just by writing something into it.
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx...got it working
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!