title: Mac Sandboxing and Temp files
body: <p>I'm working on sandboxing my applications and I've got a problem because a library that I use creates temporary files when it modifies the original file, e.g.</p>
  
  <p>When it changes something in "Hello World.txt" it will create a "Hello World_temp.txt" file in the same directory and then when it's finished it will swap both files.</p>
  
  <p>This of course breaks sandboxing rules because you are only allowed to change the source file and not go around creating other files in the folder.</p>
  
  <p>I can't find any recommendations about what to do with temp files, so I'm currently just going to create the temp file in the application's container where I'm allowed to write and then swap the files.. however, that's not great if the application and the file are on different disks as it will involve <strong>copying</strong> rather than moving.</p>
  
  <p>Is there a place for temporary files that we're allowed to write to?</p>
  
  <p>Best regards,</p>
  
  <p>Frank</p>