Re: <need your help> a question on lock file in OpenOffice3.2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: <need your help> a question on lock file in OpenOffice3.2

Mikhail Voytenko
Hi Zhi Bao Yan,

I am redirecting the answer to the framework development list. It is
better to ask such questions and answer them there, since more people
could participate in discussion and benefit from it.

The lock file pattern is ".~lock.<file name>#", it is the same on all
platforms. Actually it must be the same on all platforms, for the case
that the same file is opened from different machines in a heterogeneous
network.

Could you please explain in details in which circumstances are you going
to ignore the locking? I must confess, such ignoring looks like a hack,
at least from the first view.

Best regards,
Mikhail.

On 04/22/10 11:33, Zhi Bao Yang wrote:

>
> Hi Mikhail,
>
> I am a developer from IBM China Lab. Recently I am trying some
> customization work over OpenOffice3.2.
> I found your name in public web site and knew you are expert on file
> locking in OO. Could you do me a favor on a question?
>
> When a document (like odt, odp, doc) is opened in OO, it seems a lock
> file is generated in the same directory with format *.~lock.New
> Document 1.odt#*
> My question is what is the exact definition of this lock file name
> pattern? I need this in order to ignore them on some customized file
> operation.
> Is this pattern applied to all OS?
>
> Thanks,
> Best Regards
>
> // YANG Zhi Bao (杨志宝)
> // Tel. 8610-8245 3575 (t/l: 90-53575)
> // Lotus Quickr, IBM China Development Lab
>

Reply | Threaded
Open this post in threaded view
|

Re: <need your help> a question on lock file in OpenOffice3.2

Mikhail Voytenko
Hi Zhi Bao Yang,

thank you for the explanation, you are right it is no hack.
But some other applications produce lock files as well. I would then suggest just to ignore all hidden files in this case, since many of the applications make the lock files hidden. Then all the files with '.' at the beginning would not be uploaded ( if Unix convention is used ). In this case the implementation would be more general, and independent from OOo lock-file pattern.

Best regards,
Mikhail.

On 04/27/10 04:01, Zhi Bao Yang wrote:

Hi Mikhail,

Thanks for your information. Very helpful.

Answer to your question. Not a hack. Let me explain. We have a file system monitor which inspect all files in a specific directory.
When a file is saved, this file is uploaded to a remote cloud for document sharing.

Because the generated lock file is temporarily used and removed after its life cycle.
Our file system monitor won't upload this lock file. So we need the pattern to filter out lock files.


Thanks,
Best Regards

// YANG Zhi Bao (杨志宝)
// Tel. 8610-8245 3575 (t/l: 90-53575)
// Lotus Quickr, IBM China Development Lab



Inactive hide details for Mikhail Voytenko ---04/23/2010 05:07:09 PM---Hi Zhi Bao Yan, I am redirecting the answer to the frameMikhail Voytenko ---04/23/2010 05:07:09 PM---Hi Zhi Bao Yan, I am redirecting the answer to the framework development list. It is


From:

Mikhail Voytenko [hidden email]

To:

Zhi Bao Yang/China/IBM@IBMCN, dev-framework [hidden email]

Date:

04/23/2010 05:07 PM

Subject:

Re: <need your help> a question on lock file in OpenOffice3.2

Sent by:

[hidden email]





Hi Zhi Bao Yan,

I am redirecting the answer to the framework development list. It is better to ask such questions and answer them there, since more people could participate in discussion and benefit from it.

The lock file pattern is ".~lock.<file name>#", it is the same on all platforms. Actually it must be the same on all platforms, for the case that the same file is opened from different machines in a heterogeneous network.

Could you please explain in details in which circumstances are you going to ignore the locking? I must confess, such ignoring looks like a hack, at least from the first view.

Best regards,
Mikhail.

On 04/22/10 11:33, Zhi Bao Yang wrote:
      Hi Mikhail,

      I am a developer from IBM China Lab. Recently I am trying some customization work over OpenOffice3.2.
      I found your name in public web site and knew you are expert on file locking in OO. Could you do me a favor on a question?

      When a document (like odt, odp, doc) is opened in OO, it seems a lock file is generated in the same directory with format
      .~lock.New Document 1.odt#
      My question is what is the exact definition of this lock file name pattern? I need this in order to ignore them on some customized file operation.
      Is this pattern applied to all OS?

      Thanks,
      Best Regards

      // YANG Zhi Bao (杨志宝)
      // Tel. 8610-8245 3575 (t/l: 90-53575)
      // Lotus Quickr, IBM China Development Lab


-- 
Sun Microsystems GmbH                Mikhail Voytenko
Nagelsweg 55                         Software Engineer
20097 Hamburg                        Phone: (+49 40)23646 500
Germany                              Fax:   (+49 40)23646 550
http://www.sun.de                    [hidden email]

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Jürgen Kunz