11

Where does Mac OS X store TextEdit's unsaved documents?

I want to programmatically:

  1. increase/decrease that size
  2. flush the cache
  3. provide configuration option to control the frequency of auto saving/caching
  • 1
    I'm pretty sure you won't be able to do #1: the mechanisms available for OS X and TextEdit to keep the unsaved documents don't depend on a static size; the storage space will grow or shrink as needed. – CajunLuke Apr 18 '12 at 6:07
  • what do you mean by static size ? i am keenly interested to locate the place where OSX keeps these unsaved files from the TextEdit. – Jay D Apr 18 '12 at 6:12
  • 2
    "Static" as in "unchanging". There's nothing saying "this file will be X megabytes" anywhere: it's allowed to float to be as big as it needs to be. – CajunLuke Apr 18 '12 at 14:09
13

For Lion: It is in ~/Library/Containers/com.apple.TextEdit/Data/Library/Autosave\ Information/, e.g. Unsaved TextEdit Document.rtf.

Note that ~/Library is not visible by default in Finder in Lion, but you can access it by pasting the path in Finder (without the backslash in "Autosave Information"; the formatting above is for cd-ing in Terminal.app), or there is an option to enable the visibility (chflags nohidden ~/Library)

For Snow Leopard (credit goes to @binarybob, his comment is below) it is in ~/Library/Autosave Information also named Unsaved TextEdit Document.rtf

  • 1
    Thanks for the response . I do'nt have a containers folder ? where else can i look ? – Jay D Apr 18 '12 at 6:50
  • 1
    Which OS X version are you using? Are you sure that you are looking in ~/Library and not /Library? Finally, try to create unsaved document in Text Edit, and see if the directory appears; it may not be there by default. – lupincho Apr 18 '12 at 6:54
  • 2
    @JayD Thanks, but the existing answer already provided correct information, all I did was augment it :) If lupincho wants to add my comment to the actual answer, I'm more than happy for that to happen. – binarybob Apr 19 '12 at 7:49
  • 2
    @binarybob: I added your comment to the answer. – lupincho Apr 19 '12 at 10:18
  • 2
    Be careful, TextEdit forgets to resume some documents. In Mavericks, I look in ~/Library/Containers/com.apple.TextEdit/Data/Library/Autosave Information, and what a surprise ! I find about 40 documents stored. In TextEdit I have only 13 documents. In resuming the sessions, week after week, TextEdit has lost many other documents — I have not closed them. The good news is that these documents did not get deleted. The bad news is that TextEdit forgot to restore many of these documents. – Nicolas Barbulesco Jul 19 '14 at 11:04
3

Note: For macOS Mavericks, the path is slightly different. It's ~/Library/Containers/com.apple.TextEdit/Data/Documents.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .