Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Another question about Server API / File API

Hi John,

 

Thank you for the explanation.

It sounds “a bit” different from what Simon provided to me.

 

Two more questions:

 

1.       How do I create file with “no-overwrite” ?

2.       What if I want to “move,no-overwrite” a directory A to the place B and there is only an empty directory B there ? Still 412 ?

 

 

Best Regards,

Vitaly

 

 

From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of John Arthorne
Sent: Donnerstag, 22. August 2013 15:44
To: Orion developer discussions
Subject: Re: [orion-dev] Another question about Server API / File API

 

Hi Vitaly,

I was the author of the server file implementation, and I missed your questions because I was away on holiday for the past two weeks. There are some incorrect details here. If you perform copy, move, or create with "no-overwrite" header, and there is a conflicting file at the destination, then the entire operation fails. You should get a 412 "precondition failed" response from the server. If you see a case where this does not happen, please open a bug. This is documented in the API here:

http://wiki.eclipse.org/Orion/Server_API/File_API#Notes_on_POST_method

These copy/move overwrite semantics were copied from WebDAV (apart from the header names):

http://tools.ietf.org/html/rfc4918#section-9.9.3

If you have any more questions feel free to ask and I will try to answer. If you see inconsistencies between spec and implementation, please open bug reports.

John




From:        "Kozyura, Vitaly" <v.kozyura@xxxxxxx>
To:        Orion developer discussions <orion-dev@xxxxxxxxxxx>,
Date:        08/14/2013 06:41 AM
Subject:        Re: [orion-dev] Another question about Server API / File API
Sent by:        orion-dev-bounces@xxxxxxxxxxx





Hi Simon,
 
Ok. I understand your point. And probably the empty directories on the source side should be deleted (?).
From my perspective such “move, no-overwrite” produces a strange remains on the source side, bit if this is Orion specification, I can live with it.
 
Thank you for the explanation.
Vitaly
 
 
From: orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon Kaegi
Sent:
Dienstag, 13. August 2013 20:15
To:
Orion developer discussions
Subject:
Re: [orion-dev] Another question about Server API / File API

 

Indeed. I should have clarified that case.
The move is a best effort so that all files that can be successfully moved are. If the files cannot be moved (because a file exists already and no-overwrite is set) they are "not deleted" and will remain in the source directory.


-Simon


Inactive hide details for Mike Wilson---08/13/2013 11:51:00 AM---Definitely not ideal, if true. McQ.Mike Wilson---08/13/2013 11:51:00 AM---Definitely not ideal, if true. McQ.


From:


Mike Wilson/Ottawa/IBM@IBMCA


To:


Orion developer discussions <
orion-dev@xxxxxxxxxxx>,


Date:


08/13/2013 11:51 AM


Subject:


Re: [orion-dev] Another question about Server API / File API


Sent by:


orion-dev-bounces@xxxxxxxxxxx

 






Definitely not ideal, if true.

McQ.


Inactive hide details for "Kozyura, Vitaly" ---2013/08/13 10:36:40---Does it mean existing files will be skiped and nevertheles"Kozyura, Vitaly" ---2013/08/13 10:36:40---Does it mean existing files will be skiped and nevertheless deleted from the source destination? Fro

From:
"Kozyura, Vitaly" <v.kozyura@xxxxxxx>
To:
Orion developer discussions <
orion-dev@xxxxxxxxxxx>,
Date:
2013/08/13 10:36
Subject:
Re: [orion-dev] Another question about Server API / File API
Sent by:
orion-dev-bounces@xxxxxxxxxxx






Does it mean existing files will be skiped and nevertheless deleted from the source destination?


From:
orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon Kaegi
Sent:
Dienstag, 13. August 2013 16:21
To:
Orion developer discussions
Cc:
Orion developer discussions;
orion-dev-bounces@xxxxxxxxxxx
Subject:
Re: [orion-dev] Another question about Server API / File API
 

1) Perform a "copy, no-overwrite"
2) Delete the source folder and all sub-files and folders.


Inactive hide details for "Kozyura, Vitaly" ---08/13/2013 09:54:45 AM---Hi Simon, Thank you for the explanation."Kozyura, Vitaly" ---08/13/2013 09:54:45 AM---Hi Simon, Thank you for the explanation.  


From:


"Kozyura, Vitaly" <
v.kozyura@xxxxxxx>


To:


Orion developer discussions <
orion-dev@xxxxxxxxxxx>,


Date:


08/13/2013 09:54 AM


Subject:


Re: [orion-dev] Another question about Server API / File API


Sent by:


orion-dev-bounces@xxxxxxxxxxx

 







Hi Simon,

Thank you for the explanation.

Could you describe me in the same way “move, no-overwrite”?

Regards,
Vitaly


From:
orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon Kaegi
Sent:
Dienstag, 13. August 2013 15:44
To:
Orion developer discussions
Subject:
Re: [orion-dev] Another question about Server API / File API

 

For copy with no-overwrite we will "try" to copy every file and folder only skipping files that already exist.
e.g.
1) If a folder already exists that's fine and any sub-file and folder copy operations will continue.
2) If a file already exists we will skip it.

-Simon


Inactive hide details for "Kozyura, Vitaly" ---08/12/2013 03:36:57 AM---Hi Mark, Thank you for the explanation."Kozyura, Vitaly" ---08/12/2013 03:36:57 AM---Hi Mark, Thank you for the explanation.  


From:


"Kozyura, Vitaly" <
v.kozyura@xxxxxxx>


To:


Orion developer discussions <
orion-dev@xxxxxxxxxxx>,


Date:


08/12/2013 03:36 AM


Subject:


Re: [orion-dev] Another question about Server API / File API


Sent by:


orion-dev-bounces@xxxxxxxxxxx

 








Hi Mark,

Thank you for the explanation.

What should happen if by “copy directory, no-overwrite” one file inside of the destination directory already exists?
Should the whole command be canceled?
What if only the empty destination directory exists?

Regards,
Vitaly




From:
orion-dev-bounces@xxxxxxxxxxx [mailto:orion-dev-bounces@xxxxxxxxxxx] On Behalf Of Mark Macdonald
Sent:
Freitag, 9. August 2013 18:13
To:
Orion developer discussions
Subject:
Re: [orion-dev] Another question about Server API / File API


Hi Vitaly,

Here are, taken from the Orion source code, the current values that can go into X-Create-Options. (This is not an exhaustive list: more options may be added in future, and implementations are required to ignore unrecognized options.)
 

  • copy  
  • move  
  • no-overwrite

Valid combinations are produced by taking one of either "copy" or "move", and optionally adding "no-overwrite". Hence the valid combinations are:  

  • copy
  • move
  • copy,
    no-overwrite
    (order doesn't matter)
     
  • move,no-overwrite  (order doesn't matter)

Thanks for pointing out that these details were missing from the Server API docs. I have added them to the wiki.

Mark



On Wed, Aug 7, 2013 at 11:21 AM, Kozyura, Vitaly <v.kozyura@xxxxxxx> wrote:

Hi all,

I have another question about Orion File API.

What are the possible values for  
X-Create-Options ?
And what are the allowed combinations of this values ?

Is there some detailed documentation about it ?


Thanks in advance,
Vitaly


_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top