Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>FileLockerNew to Visual Studio Code? Get it now.
FileLocker

FileLocker

Muhammad Umer Shahzad

| (0) | Free
Team file locking for shared network projects.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FileLocker

Developed by DevVault Technologies.

FileLocker is a VS Code extension for teams working in the same shared network project folder. It helps stop two developers from editing the same file at the same time.

Why It Is Needed

When multiple developers work directly from one shared folder, one developer may overwrite another developer's changes by mistake.

FileLocker prevents this by locking a file when one developer opens it.

How It Works

  1. A developer opens a file in VS Code.
  2. FileLocker creates a lock inside .vscode-file-locks.
  3. If another developer opens the same file, FileLocker shows who locked it and blocks the file.
  4. When the owner closes the file tab, the file unlocks automatically.
  5. If VS Code closes normally, FileLocker also tries to clean up that user's locks.

The lock owner is saved like this:

username@machine-name

Lock files store the workspace-relative file path, owner name, machine name, and lock time. They do not store the user's full local file path.

Network Usage

FileLocker does not use a hardcoded IP address.

It uses the folder currently opened in VS Code. Every developer must open the same shared network folder.

Correct:

\\SERVER\Projects\FileLockerProject

Wrong:

C:\Users\DeveloperA\Desktop\FileLockerProject
C:\Users\DeveloperB\Desktop\FileLockerProject

Developer Usage

  1. Install the FileLocker .vsix extension in VS Code.
  2. Open the shared network project folder.
  3. Open a file to lock it.
  4. Close the file tab to unlock it.

Manual unlock fallback:

Ctrl + Shift + P > File Locker: Unlock Current File

Settings

FileLocker can be adjusted from VS Code settings:

{
  "fileLocker.enabled": true,
  "fileLocker.showLockNotifications": true
}

Turn fileLocker.enabled off when you need to temporarily disable automatic locking for a workspace.

Security Notes

FileLocker is designed to prevent accidental overwrites between trusted developers using the same shared folder. It is not a security boundary and does not replace file system permissions, source control, backups, or code review.

Anyone who can write to the shared folder can also create, delete, or edit files in .vscode-file-locks. Use normal network share permissions to control who can access the project.

Build The VSIX

Open terminal in this folder:

E:\FileLocker-main\file-locker

Run:

npm install
npm run compile
npm run vsix

This creates:

file-locker-0.0.1.vsix

Give that .vsix file to developers.

Install The VSIX

In VS Code:

Extensions > three dots menu > Install from VSIX...

Then select:

file-locker-0.0.1.vsix

Restart VS Code after installation.

Important

Every developer must install FileLocker.

Every developer must open the same shared network folder.

Add this to the shared project's .gitignore:

.vscode-file-locks/
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft