Skip to content
Browse files

AS guide: specifies that renaming a file is atomic on POSIX systems

  • Loading branch information...
1 parent 81e779a commit d91ac89ab83735ad1149907e942c2b0d67e03a56 @fxn fxn committed Feb 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_support_core_extensions.textile
View
2 railties/guides/source/active_support_core_extensions.textile
@@ -2118,7 +2118,7 @@ File.atomic_write(joined_asset_path) do |cache|
end
</ruby>
-To accomplish this +atomic_write+ creates a temporary file. That's the file the code in the block actually writes to. On completion, the temporary file is renamed. If the target file exists +atomic_write+ overwrites it and keeps owners and permissions.
+To accomplish this +atomic_write+ creates a temporary file. That's the file the code in the block actually writes to. On completion, the temporary file is renamed, which is an atomic operation on POSIX systems. If the target file exists +atomic_write+ overwrites it and keeps owners and permissions.
WARNING. Note you can't append with +atomic_write+.

0 comments on commit d91ac89

Please sign in to comment.
Something went wrong with that request. Please try again.