问题
Is there a way to detect within a 365 Addin, if a file is currently being edited before deleting from OneDrive? I checked documentations for Microsoft Graph, Office Dev and OneDrive but didn't find anything.
If there currently isn't way, is Microsoft considering to make a call or service for the future?
Thank you,
回答1:
unfortunately there isn't a way to do this right now. However, if a file is currently being edited, then DELETE will return an error, since the file is effectively locked by the people who have it open. If this doesn't work for you, and your add-in needs a way to proactively determine whether a file is locked before issuing the delete, then please submit your feature request on our UserVoice page: https://onedrive.uservoice.com/forums/262982-onedrive/category/89523-developer
来源:https://stackoverflow.com/questions/41028428/detect-if-file-is-open-and-being-edited