Write access forbidden
-
Is it possible in notepad++ to set an option that I can´t open the same file with write access.
In microsoft word if I want to open the same file twice I will get an message that the file is already opened.
We have the problem that several persons edit one file with notepad++. I will get an message if an other person has opened the file already.Please can you help me?
-
at this time are you seeking a plugin or script who notify if file has already opened in npp or another editor ?
-
Yes an plugin or if there is any setting to change this.
-
document list panel can show you file has set as read only
setting > preference > general > document list panel
-
With document list panel I can´t see that the file is already opened by an other user.
-
yes i have c# code for write a plugin for notify if file in use (file is busy) but not sure it works file who in use by other user
protected virtual bool IsFileLocked(FileInfo file) { FileStream stream = null; try { stream = file.Open(FileMode.Open, FileAccess.Read, FileShare.None); } catch (IOException) { //the file is unavailable because it is: //still being written to //or being processed by another thread //or does not exist (has already been processed) return true; } finally { if (stream != null) stream.Close(); } //file is not locked return false; } -
I don´t know, how I import this code as plugin.
-
-
I don´t know what I should do with this c# code.
-
Currently you cannot know that another person has already opened the file.
It is because the file is kept open for a very short time (only when reading it or writing it) and then it is immediately closed.BR
-
Ok many thanks for your answer. I know that other editors can lock this file during it is in use.
Is that option planned for development? -
I don’t know but I don’t think so.
You can file a feature request here if you like:
https://github.com/notepad-plus-plus/notepad-plus-plus/issuesBR
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login