File locking allows users to place locks on files and folders in Team Shares. This feature is useful when you want to prevent other user accounts from editing your items when you are making changes, which prevents file sync warnings. You can place locks on a whole Team Share, a subfolder in a Team Share, or a file in a Team Share. When an item is locked, a lock icon will be placed over the file or folder, and it will become read-only for others subscribed to the Team Share.
If you forget to lock a file or folder before you begin making changes, you could encounter file sync warnings. A file sync warning might take the form of a collision, where two Team Share subscribers try to edit the same file at the same time, or a locked change warning, where a user attempts to edit a locked file. When a file sync warning occurs, the system will notify you of the conflict, and will help you resolve the issue.
Your administrator can configure a Team Share so that Microsoft Team Share files automatically prompt you to lock the files each time they are opened. When you confirm the lock, the files will automatically unlock when you close the file.