I am creating a binary editor for some very large binaries. One of the requirements for the software is that the editor cannot modify the source file, so the target file must be an edited copy of the original.
I want to create an editor in such a way that the file is copied only once (this will be a 20-minute process). I know that I can lock the file during editing, but if the user quits the program, they will have to go through the entire 20-minute copying process again if I cannot find a way to determine that they are still in their initial editing session.
Is there any simple process that you can think of, through which I can let the user "register" the copied file in some way as an editable file, and when they are filled with all their changes, "complete" the file?
Ideally, such a process will allow me to determine if the edited file or transaction information between editing sessions has been changed (faking or finalizing will result in another copy if the file is edited again).
?
, , . , . .
, , .
, .
, . - , . , , , , .
, blob, , . , , , - . , , .
, . , , . , , , . ( , .)
, (.. ), , . , .
, ? (, pid). pid - pid, . pid, . pid , ; , , ( ). pid 0, .
: , ?
, "diff" . , "" , . , , .
, , , , . , , . 20 , . diff, .
Since you are thinking about transactions and file system activity, it may be helpful to consider Transactional NTFS. This does not answer your question, but may give you a new idea of the possibilities. Since your question is tagged for C # and Windows, you can look at the .NET shell, for example here: http://offroadcoder.com/CategoryView,category,Transactions.aspx . Scott Kluppel shows how to do transactional NTFS using the familiar .NET TransactionScope idiom. I quickly checked what Scott did and, like what I saw.
Source: https://habr.com/ru/post/1785494/More articles:Java Swing: текст призрака появляется при обновлении текста в JTextArea с частично прозрачным фоном - javaWhat is the difference between “./” and “open” in a terminal and how can I run a Unix executable from Xcode? - terminalWarning - access to static field year - javaIphone reads audio from embedded applications - iphoneIs valid SSL certificate required for claim based authentication in Sharepoint Foundation 2010? - sharepointCopying files during assembly - visual-studio-2008https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1785496/c-sp2010-adding-items-to-a-list&usg=ALkJrhju6RB3yJrFc8vR1eTPmvtaCjyJSQProblem with iOS MPMoviePlayer on iPod touch 2G - iosAndroid: a few questions API camera - androidjava: getting the right resource - javaAll Articles