Hi,
I was trying to understand the role of OS and FSD in file access and
sharing. I could not find much information on following topics.
How does OS knows if file is in use? There can be multiple file objects
based on open handles and they all must be linked to particular file path
in some way. How is done that? I know that FSContext is used to link file
objects of same file.
Since there are multiple file objects for a file, each object might have
different share mode. So when a new file object is created, does OS loops
through all the file objects to find if the share mode of new file object
is compatible with existing file objects or does it maintain a “resultant”
share mode from all the existing file objects.
Finally, I believe file locking is also a function of OS as it works with
only File APIs and not with memory mapped files. Is that true?
I need to understand above to design a applications using cloud storage
drives such as OneDrive or Google Drive. I understand all the Windows File
APIs will work with them as share mode, access rights and file locking are
functions of OS.
Thanks
Ash