Negating the result of list.isEmpty is similar to directoryExists. On Tue, Sep 19, 2017 at 10:32:34AM +0200, GARDAIS Ionel wrote: > Thanks for the clarification. > > So > directoryExists(container, directory) > is to be replaced by > list(container, prefix(directory)).isEmpty() > > -- > Ionel GARDAIS > Tech'Advantage CIO - IT Team manager > > ----- Mail original ----- > De: "Andrew Gaul" <[email protected]> > À: "user" <[email protected]> > Envoyé: Mardi 19 Septembre 2017 10:17:31 > Objet: Re: directoryExists vs blobExists > > Prefix allows clients to filter results which only match a prefix. For > example, prefix a/ with a/1, a/2 and b/3 keys would only match a/1 and > a/2. Delimiter filters results based on a partial suffix. For example, > delimiter / with the previous keys would return a and b. > > Prefix and delimiter have more utility and match how blobstores actually > work. File systems have an actual hierarchy such that creating a/b will > create two entries and must prohibit operations like removing a before > removing a/b. Object stores remove these invariants to increase > scalability. jclouds previously mapped directory operations onto > pseudo-file system operations, inconsistently and poorly. > > On Tue, Sep 19, 2017 at 08:37:26AM +0200, GARDAIS Ionel wrote: > > Thanks Andrew. > > > > Do I understand correctly that "prefix and delimiter" is "path ending with > > a /" (like in "folder/") ? > > > > Regards, > > -- > > Ionel GARDAIS > > Tech'Advantage CIO - IT Team manager > > > > ----- Mail original ----- > > De: "Andrew Gaul" <[email protected]> > > À: "user" <[email protected]> > > Envoyé: Lundi 18 Septembre 2017 19:53:08 > > Objet: Re: directoryExists vs blobExists > > > > jclouds deprecated and will remove support for directories from the > > portable abstraction since most object stores do not not support them. > > Directories should still work through the provider level but I recommend > > using the prefix and delimiter options instead. Tracking issue: > > > > https://issues.apache.org/jira/browse/JCLOUDS-1066 > > > > On Mon, Sep 18, 2017 at 05:26:31PM +0200, GARDAIS Ionel wrote: > > > Hi, > > > > > > Got a question about using the filesystem API. > > > As a blob wrote using putBlob(« container », "folder/file.t xt »); > > > > > > directoryExists(« container », « folder") returns true > > > > > > blobExists(« container », « folder") returns false > > > blobExists(« container », « folder/") returns false > > > > > > As directoryExists() is deprecated, what should be used ? > > > > > > Thanks, > > > Ionel > > > > > > -- > > > > > > 232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON > > > > > > Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 > > > 301 > > > > > > > > BEGIN:VCARD > > > VERSION:3.0 > > > FN:GARDAIS\, Ionel > > > N:GARDAIS;Ionel;;; > > > ADR;TYPE=work,postal,parcel:;;1 Rue Isabey;RUEIL > > > MALMAISON;IdF;92500;FRANCE > > > TEL;TYPE=work,voice:0147088131 > > > EMAIL;TYPE=internet:[email protected] > > > URL;TYPE=work:http://www.techad.fr > > > ORG:TECH advantage > > > TITLE:CIO > > > REV:2016-12-16T11:52:22Z > > > UID:5a4525af-5d0c-4a32-a77b-c565580b116e:114277 > > > END:VCARD > > > > > > -- > > Andrew Gaul > > http://gaul.org/ > > -- > > 232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON > > Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 301 > > > > -- > Andrew Gaul > http://gaul.org/ > -- > 232 avenue Napoleon BONAPARTE 92500 RUEIL MALMAISON > Capital EUR 219 300,00 - RCS Nanterre B 408 832 301 - TVA FR 09 408 832 301 >
-- Andrew Gaul http://gaul.org/
