Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
File deletion
kri shan
Ranch Hand
Posts: 1491
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How to delete a file from directory based on the specified time period. Like WatchService
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Based on what time period? Like WatchService how?
Please ask more clear, detailed questions.
kri shan
Ranch Hand
Posts: 1491
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
time period based on minutes (60 minutes.) Can i WatchService or other API ?
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
posted 8 years ago
3
Number of slices to send:
Optional 'thank-you' note:
Send
WatchService allows you to wait for events. Your problem isn't event-based but time-based.
You could use the
java.nio.file.Files
API in combination with a
java.util.concurrent.ScheduledExecutorService
to achieve this.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Methods for threads?
Info about modifying watching a directory for change.
How to lock a file?
c shell aging script
Thoughts regarding exam objectives for NIO 2
More...