FileInfoExtensionsLock Method

Overload List

Lock(FileInfo) Locks read/write access to the specified file for other applications (during the lifetime of the current application).

To unlock the file, just dispose the returned FileStream object.

Lock(FileInfo, FileShare) Locks read/write access to the specified file for other applications (during the lifetime of the current application).

To unlock the file, just dispose the returned FileStream object.

See Also