This object is in archive! 
File editor: 'same file already open' notification
Needs Feedback
An inline notice if you open duplicates of the same file through the editor. This helps prevent someone from overwriting changes they make in one window by saving another.
In what manner would you suggest be used to consider whether a file is open or closed? The complication with this request is that, as far as the actual filesystem is concerned, the file is not actually "open" when you're viewing it in the editor.
Methods to consider a file "open" could be tracking the user's cPanel session versus its last requested file through the editor.
However, this doesn't bring us much closer to an open/closed consideration. If the user navigates to a file but then navigates away/closes their browser, how long do we consider it still "open" from its last interaction before timing it out and considering it closed again?
It would be rare for every interaction to be a clear cut "file visited in editor -> work done -> save action made".
The best compromise I could see that would still be accurate and useful would be a "last opened on: *timestamp*" and/or "last modified on: *timestamp*".
Beyond that, anything I can think of would be wildly inaccurate at best. This still would be unable to accommodate if anyone had the file opened in any other editor (through shell or otherwise). Accordingly, I encourage further discussion and feedback on this.
In what manner would you suggest be used to consider whether a file is open or closed? The complication with this request is that, as far as the actual filesystem is concerned, the file is not actually "open" when you're viewing it in the editor.
Methods to consider a file "open" could be tracking the user's cPanel session versus its last requested file through the editor.
However, this doesn't bring us much closer to an open/closed consideration. If the user navigates to a file but then navigates away/closes their browser, how long do we consider it still "open" from its last interaction before timing it out and considering it closed again?
It would be rare for every interaction to be a clear cut "file visited in editor -> work done -> save action made".
The best compromise I could see that would still be accurate and useful would be a "last opened on: *timestamp*" and/or "last modified on: *timestamp*".
Beyond that, anything I can think of would be wildly inaccurate at best. This still would be unable to accommodate if anyone had the file opened in any other editor (through shell or otherwise). Accordingly, I encourage further discussion and feedback on this.
For the sake of possibility, I think you could comfortably ignore files accessed via shell and say, "This file is open in another instance of the file manager."
Does the file manager have an auto-save feature? Does anything in cPanel have a similar method that could be used? If the auto-save method connects, consider the file open.
If there isn't any kind of auto-saving, I'm sure that the logic that commonly uses would work. The editing window in the file manager can push a "Hey, I'm still here," notice. If it receives multiples, throw the notice there.
For the sake of possibility, I think you could comfortably ignore files accessed via shell and say, "This file is open in another instance of the file manager."
Does the file manager have an auto-save feature? Does anything in cPanel have a similar method that could be used? If the auto-save method connects, consider the file open.
If there isn't any kind of auto-saving, I'm sure that the logic that commonly uses would work. The editing window in the file manager can push a "Hey, I'm still here," notice. If it receives multiples, throw the notice there.
Replies have been locked on this page!