3 ms·
When I last tried to implement this, by far the toughest part was making sure the file that’s been newly detected is done being written to. On ntfs I couldn’t
by bigmattystyles 4y ago
When I last tried to implement this, by far the toughest part was making sure the file that’s been newly detected is done being written to. On ntfs I couldn’t find a good technique, even last modified time was not reliable. I had to watch it for changes myself.
- nomel 4y agoIs "last modified" the time of the beginning of the write?
- bigmattystyles 4y agoNever even thought of that; I don’t know. I assumed it was when a write was done. Whatever that means, I don’t know either.
- infogulch 4y agoI've done this by watching the NTFS journal which is surprisingly efficient. First I scanned the whole journal for filesystem metadata and dumped it into a SQLite database (which took about a minute), then kept it up to date which took virtually no resources. This was an absurdly faster way to search by file name, a search across the whole FS came back in milliseconds instead of Explorer's multiple minutes.