<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Can I check if a file is in use - Comments</title>
 <link>http://community.activestate.com/forum-topic/can-i-check-if-file-use</link>
 <description>Comments for &quot;Can I check if a file is in use&quot;</description>
 <language>en</language>
<item>
 <title>you could try and flock it</title>
 <link>http://community.activestate.com/forum-topic/can-i-check-if-file-use#comment-4279</link>
 <description>&lt;p&gt;you could try and flock it &lt;a&gt;http://perldoc.perl.org/functions/flock.html&lt;/a&gt;&lt;/p&gt;
</description>
 <pubDate>Fri, 22 Feb 2008 01:37:23 +0000</pubDate>
 <dc:creator>sang33ta</dc:creator>
 <guid isPermaLink="false">comment 4279 at http://community.activestate.com</guid>
</item>
<item>
 <title>Can I check if a file is in use</title>
 <link>http://community.activestate.com/forum-topic/can-i-check-if-file-use</link>
 <description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using this code:&lt;br /&gt;
if (-w &quot;$dir/zotero.sqlite&quot;) {&lt;/p&gt;
&lt;p&gt;also tried&lt;br /&gt;
if (-r &quot;$dir/zotero.sqlite&quot;) {&lt;/p&gt;
&lt;p&gt;In both cases it comes back true when in actual fact that sqlite database file is in use. I&#039;m wondering if there is a more accurate way of testing if this file is in use.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Caleb&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/can-i-check-if-file-use#comments</comments>
 <category domain="http://community.activestate.com/forums/perl-discussion-0">Perl discussion</category>
 <category domain="http://community.activestate.com/os/windows-vista">Windows Vista</category>
 <pubDate>Thu, 07 Feb 2008 03:38:27 +0000</pubDate>
 <dc:creator>calebsg</dc:creator>
 <guid isPermaLink="false">1899 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
