Here is a custom function I made that will delete all files in a folder older than N time.

Time here can be minutes, seconds or hours by using the strtotime() function. So for example, if you want to delete old files less than 4 hours, you can call strtotime(‘-4 hours’).

There may be cases when you call the delete() method in Java and your program does not delete the file. A case like this can  only mean that the file is still being used provided that the file exists.

Suggestions indicate that you need to close the stream that uses the file. However, if all else fails, a simple hack can be done to fix this problem.

Just call System.gc() and it should do the trick.

While JEasyUI has an extended DataGrid component called eDataGrid, I opted to still use DataGrid rather than load up another script library.

Here is the function to delete a row in a JEasyUI DataGrid table complete with a notification popup when the delete HTTP request is in progress and closes itself when it is done.

Related Posts Plugin for WordPress, Blogger...