[Archived] Middleware for handling requests for file system resources including files and directories. Project moved to https://github.com/aspnet/AspNetCore
In my custom IFileProvider, i'd like it to behave correctly when a file being watched is deleted. I already have it returning a custom IChangeToken for the watched file, but i'm not clear on exactly what needs to be done in order to correctly signal a Delete. Are there any examples of this that I could look at? Is it just as simple as passing Null when raising the callbacks - i.e:
Where all RaiseCallback does is loop through the subscribed listners and invoke them passing the specified argument - which usually would be the updated file, but in this case as the file is deleted, I guess I would need to set it to null?
Hello,
In my custom IFileProvider, i'd like it to behave correctly when a file being watched is deleted. I already have it returning a custom
IChangeToken
for the watched file, but i'm not clear on exactly what needs to be done in order to correctly signal a Delete. Are there any examples of this that I could look at? Is it just as simple as passingNull
when raising the callbacks - i.e:Where all
RaiseCallback
does is loop through the subscribed listners and invoke them passing the specified argument - which usually would be the updated file, but in this case as the file is deleted, I guess I would need to set it to null?