FileSystemWatcher m_Watcher = new System.IO.FileSystemWatcher();
m_Watcher.Path = "C:\\";
m_Watcher.NotifyFilter = NotifyFilters.LastAccess |
NotifyFilters.LastWrite |
NotifyFilters.FileName |
NotifyFilters.DirectoryName;
m_Watcher.IncludeSubdirectories = true;
m_Watcher.Changed += new FileSystemEventHandler(OnChanged);
m_Watcher.Created += new FileSystemEventHandler(OnChanged);
m_Watcher.Deleted += new FileSystemEventHandler(OnChanged);
m_Watcher.Renamed += new RenamedEventHandler(OnRenamed);
m_Watcher.EnableRaisingEvents = true;
private void OnChanged(object sender, FileSystemEventArgs e)
{
}
private void OnRenamed(object sender, RenamedEventArgs e)
{
}
SMTP (0) | 2015.07.19 |
---|---|
Simple Network Time (NTP) Protocol Client (0) | 2014.10.15 |
프로그램 중복 실행 방지 (0) | 2014.08.07 |
time.windows.com 동기화 (0) | 2014.06.18 |
c# 동영상 녹화 (0) | 2014.05.13 |