problem facing Files.listFiles also list the file whose writting is in progress.
posted 6 years ago
i am writing some files (txt) in a location.many application try to access it and write the file in same location.
at 10 minutes interval my scheduler comes and try to read the file and send the mail by reading the content in above directory. but at the same time since many apps are writing the file. any many files may be half written. my schedular reads the half content only and send the file. i want to know is there any way i can block reading the files which are not fully written