{"id":12,"date":"2006-11-27T13:56:39","date_gmt":"2006-11-27T13:56:39","guid":{"rendered":"https:\/\/virtualchaos.co.uk\/blog\/2006\/11\/27\/platform-dependent-file-locking\/"},"modified":"2006-11-27T14:00:19","modified_gmt":"2006-11-27T14:00:19","slug":"platform-dependent-file-locking","status":"publish","type":"post","link":"https:\/\/virtualchaos.co.uk\/blog\/2006\/11\/27\/platform-dependent-file-locking\/","title":{"rendered":"Platform dependent file-locking"},"content":{"rendered":"<p>MS Windows and Linux handle file locking differently. This <a href=\"http:\/\/en.wikipedia.org\/wiki\/File_locking\">article<\/a> describes both approaches in detail. To summarise though, when you open a file for reading, under windows it prevents others from deleting it or writing to it, however under Linux it does not.<\/p>\n<p>I fell foul of this while trying to run some Java based unit tests that worked perfectly well under Linux but started throwing errors on windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MS Windows and Linux handle file locking differently. This article describes both approaches in detail. To summarise though, when you open a file for reading, under windows it prevents others from deleting it or writing to it, however under Linux &hellip; <a href=\"https:\/\/virtualchaos.co.uk\/blog\/2006\/11\/27\/platform-dependent-file-locking\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,10,6],"tags":[388,390,386],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-java","category-linux","category-microsoft","tag-java","tag-linux","tag-microsoft"],"_links":{"self":[{"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":0,"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualchaos.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}