首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Customized Utility 一: FileChangeMonitor

2012-11-03 
Customized Utility 1: FileChangeMonitor????? When we are in software developing we usually need to

Customized Utility 1: FileChangeMonitor

????? When we are in software developing we usually need to do some very simple things manually, for instance, we offen need to check the files under a directory is added or deleted. especially when your software come to test peroid, that means you have to install and uninstall your software many times, and every time your want to know which file has been added or which has been deleted, and for this requirement, this piece's Customized Utility Came out, the following is more detailed depicted:

?

Functionality:

????? FileChangeMonitor can help you monitor the files change under a defined folder, and record the monitor result to a defined file, and also can output the monitor result to console if you would. ?this utility is pretty useful when install some plugin software base on underlying software, in this occation, if you define your monitor the underlying software before you intall your plugin software, and then FileChangeMonitor will help you record what you had done, this pretty cool to a software developer.

????? FileChangeMonitor.xml has been supplyed for you to define the folder need to monitor, the result saved file and whether need to output to console or not, as following:

???????????? monitor.folder: use to define the folder need to monitor

???????????? hander.file: the name of result record file name

?????????????hander.console: whether need to output to console or not(only 'true' or 'false' are allowed)

?

Utility Consists:

????? FileChangeMonitor consists of?Three part:

????? 1. Runnable lib folder(contain all jar files);

????? 2. Configuration file(FileChangeMonitor.xml)?;

????? 3. Executable script file both Windows and Linux(run.cmd and run.sh).

the figure below has a detailed instrcution.


Customized Utility 一: FileChangeMonitor
?

How to Use?

????? FileChangeMonitor is very easy to use, i will give a Step by Step pictured demonstration:

????? 1. Use a file editor tool to editor FileChangeMonitor.xml to define a folder to monitor, the file name to save record monitor result, whether need to output to console, the belows?show the?monitored folder is "D:\dev-test\home", the result will be saved to "record.log" file and need to output to console.

?
Customized Utility 一: FileChangeMonitor
??????

????? 2. Start a command line, navigate to FileChangeMonitor folder?and execute 'run.cmd' if you are in Windows system;
Customized Utility 一: FileChangeMonitor
??????

????? 3. Do some change in monitored folder and check the result

?Output in console:
Customized Utility 一: FileChangeMonitor
record.log will be found in FileChangeMonitor root, and open the file you will find the same info:
Customized Utility 一: FileChangeMonitor
?

????? 4. Use Ctrl + C can terminate the FileChangeMonitor;
Customized Utility 一: FileChangeMonitor
?

Supplement Claims:

????? 1. The FileChangeMonitor do not support monitor a folder which own millions of files;

????? 2. The FileChangeMonitor do not suppport to delete and add the same file very frequently.

?

Ending

??????The attached file 'FileChangeMonitor.rar' contain both FileChangeMonitor?utility and src code.??

?

热点排行