Perhaps not a high priority ... especially given that CTFTPDaemon is not a core part of Circle ... but you have provided some nice virtual functions for opening files for reading (FileOpen()) and writing (FileCreate()) and checking for access (IsAccessAllowed()) already.
What would be useful would be a virtual function which would pass the name of a file being transferred, once it was either successful or had failed. I thought I might be able to leverage FileClose(void), but it doesn't appear possible to get the name of the file, as the protected class variable m_Filename does not appear valid in that function.
I am assuming (hoping) that it might be easy to implement, as something like:
void TransferSuccess(const char *pFileName)
void TransferFail(const char *pFileName)
If you're wondering why this would be useful, I've occasionally had problems with a file transfer aborting, but after it does, the file being transferred is incomplete. The use case would be prefixing the filename with a known prefix (e.g., '._'), and then renaming the file without that prefix if it was successful, or deleting the prefixed file if it failed. I would implement this bespoke logic, but would need functions for Circle to call on transfer success/failure, passing the name of the file being transferred.
Otherwise, I can code fork CTFTPDaemon and make the modifications myself in a new (renamed) version, but would rather keep Circle's CFTPDaemon if I can, benefiting from any future enhancements.
Thoughts?
Cheers,
Dave.
Perhaps not a high priority ... especially given that CTFTPDaemon is not a core part of Circle ... but you have provided some nice virtual functions for opening files for reading (FileOpen()) and writing (FileCreate()) and checking for access (IsAccessAllowed()) already.
What would be useful would be a virtual function which would pass the name of a file being transferred, once it was either successful or had failed. I thought I might be able to leverage FileClose(void), but it doesn't appear possible to get the name of the file, as the protected class variable m_Filename does not appear valid in that function.
I am assuming (hoping) that it might be easy to implement, as something like:
If you're wondering why this would be useful, I've occasionally had problems with a file transfer aborting, but after it does, the file being transferred is incomplete. The use case would be prefixing the filename with a known prefix (e.g., '._'), and then renaming the file without that prefix if it was successful, or deleting the prefixed file if it failed. I would implement this bespoke logic, but would need functions for Circle to call on transfer success/failure, passing the name of the file being transferred.
Otherwise, I can code fork CTFTPDaemon and make the modifications myself in a new (renamed) version, but would rather keep Circle's CFTPDaemon if I can, benefiting from any future enhancements.
Thoughts?
Cheers,
Dave.