Hacking around mostly on:
And I mess around with basically everything else
The official repository for SimpleFileWatcher formerly at code.google.com/p/simplefilewatcher
License: Other
I start some action and wait until some file is deleted afterwards. I think
that I have missed the expected file delete event. Might be it is because file
was deleted before I call "update". I do not understand the purpose of
"update". Can I use the file watcher not to miss any events? How do I kick off
the process to remove the file and detect the event of effect?
Original issue reported on code.google.com by [email protected]
on 21 Nov 2014 at 7:41
What steps will reproduce the problem?
1. load code DLL
2. fw = new FileWatcher
3. fw->addWatch("SameDir")
4. delete fw
5. unload code DLL
6. load code DLL
7. fw = new FileWatcher
8. fw->addWatch("SameDir")
What is the expected output? What do you see instead?
when the second code dll is loaded the OS executes a WatchCallback with a
WatchStruct ( passed in lpOverlapped ) that is already destroyed. ( I have
dumped the pointers with outputdebugstring ). The dwNumberOfBytesTransfered
varies. Returning when the size is 0 is not enough, sometimes its a bigger
value. To fix the issue I have made the following modification:
bool RefreshWatch(WatchStruct* pWatch,bool _clear = false)
{
return ReadDirectoryChangesW(pWatch->mDirHandle, pWatch->mBuffer,
sizeof(pWatch->mBuffer), FALSE, pWatch->mNotifyFilter, NULL,
&pWatch->mOverlapped, _clear ? 0 : WatchCallback) != 0;
}
This allows me to clear the callback ( _clear ? 0 : WatchCallback ). The
deactivation of the callback is done in DestroyWatch:
CancelIo(pWatch->mDirHandle);
--> RefreshWatch(pWatch,true);
if (!HasOverlappedIoCompleted(&pWatch->mOverlapped))
I also return immediately when dwNumberOfBytesTransfered is 0 in the
WatchCallback
void CALLBACK WatchCallback(DWORD dwErrorCode, DWORD
dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped)
{
if (dwNumberOfBytesTransfered == 0)
return;
What version of the product are you using? On what operating system?
2009.05.14. Vista Ultimate 64Bit
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2009 at 3:33
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Jul 2012 at 9:03
What steps will reproduce the problem?
1. Open Cygwin console
2. Navigate in build/gmake folder
3. run "make"
What is the expected output? What do you see instead?
Program does not compile, i get the following error:
$ make
==== Building SimpleDemo ====
FileWatcher.cpp
../../source/FileWatcher.cpp: In constructor »FW::FileWatcher::FileWatcher()«:
../../source/FileWatcher.cpp:43:15: Fehler: expected type-specifier before
»FILEWATCHER_IMPL«
../../source/FileWatcher.cpp:43:15: Fehler: »int*« kann nicht nach
»FW::FileWatcherImpl*« in assignment umgewandelt werden
../../source/FileWatcher.cpp:43:15: Fehler: expected »;« before
»FILEWATCHER_IMPL«
SimpleDemo.make:131: recipe for target `../intermediate/Debug/FileWatcher.o'
failed
make[1]: *** [../intermediate/Debug/FileWatcher.o] Error 1
Makefile:17: recipe for target `SimpleDemo' failed
make: *** [SimpleDemo] Error 2
What version of the product are you using? On what operating system?
2009-09-14 on Windows 7 64 bit
Please provide any additional information below.
I am using the compiler of cygwin
Thank you in advance!
Original issue reported on code.google.com by [email protected]
on 26 Jan 2013 at 9:20
In the current code, the select call has a timeout of 0, which makes the
select return immediately. It might be better to use the blocking form of
select (use NULL instead of giving it a pointer to a timeout of zero
seconds) or, even better, allow the user to give a pointer to a timeval to
use as the timeout for the select call.
Original issue reported on code.google.com by [email protected]
on 12 Feb 2010 at 7:38
What steps will reproduce the problem?
1. Try to compile it on Arch Linux
2. Compile error: undefined function "open" error.
What version of the product are you using? On what operating system?
SVN r17
Please provide any additional information below.
Seems like #include <unistd.h> is missing (see patch file).
Original issue reported on code.google.com by [email protected]
on 30 Oct 2013 at 9:27
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.