• Login
Community
  • Login

Write access forbidden

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
12 Posts 3 Posters 751 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Tobias Dietrich
    last edited by Oct 2, 2019, 5:57 AM

    Yes an plugin or if there is any setting to change this.

    1 Reply Last reply Reply Quote 0
    • R
      rinku singh
      last edited by Oct 2, 2019, 6:07 AM

      document list panel can show you file has set as read only

      setting > preference > general > document list panel

      1 Reply Last reply Reply Quote 0
      • T
        Tobias Dietrich
        last edited by Oct 2, 2019, 6:38 AM

        With document list panel I can´t see that the file is already opened by an other user.

        1 Reply Last reply Reply Quote 0
        • R
          rinku singh
          last edited by Oct 2, 2019, 7:13 AM

          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;
          }
          
          1 Reply Last reply Reply Quote 0
          • T
            Tobias Dietrich
            last edited by Oct 2, 2019, 8:40 AM

            I don´t know, how I import this code as plugin.

            1 Reply Last reply Reply Quote 0
            • R
              rinku singh
              last edited by Oct 2, 2019, 8:56 AM

              file is just not busy by npp

              1 Reply Last reply Reply Quote 0
              • T
                Tobias Dietrich
                last edited by Oct 2, 2019, 11:42 AM

                I don´t know what I should do with this c# code.

                1 Reply Last reply Reply Quote 0
                • P
                  pnedev
                  last edited by Oct 3, 2019, 1:06 PM

                  @Tobias-Dietrich ,

                  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

                  1 Reply Last reply Reply Quote 2
                  • T
                    Tobias Dietrich
                    last edited by Oct 4, 2019, 4:58 AM

                    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?

                    1 Reply Last reply Reply Quote 0
                    • P
                      pnedev
                      last edited by pnedev Oct 4, 2019, 7:38 AM Oct 4, 2019, 7:36 AM

                      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/issues

                      BR

                      1 Reply Last reply Reply Quote 0
                      12 out of 12
                      • First post
                        12/12
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors