Can I search Netbeans' local history?

后端 未结 1 1996
梦如初夏
梦如初夏 2021-01-21 06:26

In one of the previous versions of one of my file in a Netbeans project I wrote code that I later removed, and now I want to retrieve it. However now I can\'t find it when I man

1条回答
  •  走了就别回头了
    2021-01-21 06:53

    I recently had to solve this problem and figured it out. Netbeans stores local history files in your user directory as mentioned above. Inside that folder are numbered directories. It's pretty easy to guess which one you need based on the modification date of the folder (if you know when you last looked at it, so that doesn't help you much). In side the numbered folders is another folder with a hashed name, and inside of that folder is a set of files: a data file, and numbered files. The data file can be read with a binary file reader, and if viewed in ascii mode will show the filename that this history belongs to. The numbered files are actually zip files and they have full versions of the file in them. Just unzip those and open with a text editor if they are plain text files.

    Hope this helps you out, but I realize its probably too late now. I had to figure this out because I had opened a remote file with netbeans (a file that was not associated with a project), and couldn't get back into the Local History because the file didn't have a project. However I could see it in the Local history by reading the data file, and I just guessed that the other files were zipped by the fact that they started with "PK" in the binary viewer. Once I put it all together I was home free.

    0 讨论(0)
提交回复
热议问题