rename method of java.io.File


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: rename method of java.io.File

  1. #1
    ramesh Guest

    rename method of java.io.File


    Hi..
    i'm using the rename method of java.io package for moving some files from
    one folder to another. This is a continuous process and executes every 15
    minutes for files files that keep coming in thru FTP at the same interval.
    The method returns a false value some times 4-5 times out of ~400 executions.
    I'm pretty sure that no other file exists with the same name, since the naming
    of the files is based on the date and timestamp.
    Can anybody give me a clue of this. Why the rename method returns false?
    Any info reg this wud be appreciated.

    Thanks.

  2. #2
    Paul Clapham Guest

    Re: rename method of java.io.File

    It returns false if the file could not be renamed. For example, if there
    was a lock on the file then perhaps you could not rename it; this might
    happen if it was only halfway uploaded. If this is the case then it is a
    positive feature as it prevents you from grabbing half-filled files.

    PC2

    "ramesh" <java.@127.0.0.1> wrote in message
    news:3e7f00b7$1@tnews.web.devx.com...
    >
    > Hi..
    > i'm using the rename method of java.io package for moving some files from
    > one folder to another. This is a continuous process and executes every 15
    > minutes for files files that keep coming in thru FTP at the same interval.
    > The method returns a false value some times 4-5 times out of ~400

    executions.
    > I'm pretty sure that no other file exists with the same name, since the

    naming
    > of the files is based on the date and timestamp.
    > Can anybody give me a clue of this. Why the rename method returns false?
    > Any info reg this wud be appreciated.
    >
    > 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center