Check if file exists in RavenFS

71 views
Skip to first unread message

marcus

unread,
Sep 30, 2014, 4:41:38 PM9/30/14
to rav...@googlegroups.com
Is it possible to make a HEAD request or similar only to check if a file exists in RavenFS? I'm thinking about something similar to this:

public static bool Exists(this IDocumentStore documentStore, string key)
   {
       return documentStore.DatabaseCommands.Head(key) != null;
   }


Federico Lois

unread,
Sep 30, 2014, 6:35:48 PM9/30/14
to rav...@googlegroups.com
It already exist in the low level API. Don't have the code right now in front of me but if I recall correctly you can .Load and the file header will be null.

Federico.

Sent from my mobile phone.

From: marcus
Sent: ‎30/‎09/‎2014 17:41
To: rav...@googlegroups.com
Subject: [RavenDB] Check if file exists in RavenFS

Is it possible to make a HEAD request or similar only to check if a file exists in RavenFS? I'm thinking about something similar to this:

public static bool Exists(this IDocumentStore documentStore, string key)
   {
       return documentStore.DatabaseCommands.Head(key) != null;
   }


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
[The entire original message is not included.]
Reply all
Reply to author
Forward
0 new messages