| 148 | } |
| 149 | |
| 150 | void FileSystemChangeNotifier::startNotifier() |
| 151 | { |
| 152 | // update the timestamps of all the files we are managing |
| 153 | |
| 154 | DirMap::Iterator itr = mDirMap.begin(); |
| 155 | |
| 156 | for ( ; itr != mDirMap.end(); ++itr ) |
| 157 | { |
| 158 | FileInfoList &fileList = itr->value; |
| 159 | |
| 160 | for ( U32 i = 0; i < fileList.getSize(); i++ ) |
| 161 | { |
| 162 | FileInfo &fInfo = fileList[i]; |
| 163 | |
| 164 | // This may fail if the file doesn't exist... thats ok. |
| 165 | FileNode::Attributes attr; |
| 166 | GetFileAttributes(fInfo.filePath, &attr); |
| 167 | |
| 168 | fInfo.savedLastModTime = attr.mtime; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | mNotifying = true; |
| 173 | |
| 174 | Process::notify( this, &FileSystemChangeNotifier::process, PROCESS_LAST_ORDER ); |
| 175 | } |
| 176 | |
| 177 | void FileSystemChangeNotifier::process() |
| 178 | { |
no test coverage detected