[Yanel-usage] get the path of a repository

Michael Wechner michael.wechner at wyona.com
Wed Aug 10 15:58:15 CEST 2011


Am 10.08.11 15:50, schrieb Bettina Messmer:
> Hi,
>
> Sorry, I just found an easier way to do, what I wanted:
>
>              out = getRealm().getRepository().getNode("/polls/" + uuid + "/comments.xml").getOutputStream();
>
> This statement provides me with the OutputStream directly, what I think is better anyway.

that's best practice :-)

Never use FileSystemOutput/Input directly except for very few exceptions ;-)

Thanks

Michael
>
> greets and thanks,
>
> Bettina
> -------- Original-Nachricht --------
>> Datum: Wed, 10 Aug 2011 14:29:49 +0200
>> Von: "Bettina Messmer"<bettina.messmer at gmx.ch>
>> An: yanel-usage at wyona.com
>> Betreff: [Yanel-usage]   get the path of a repository
>> Hi,
>>
>> I want to get the path of a directory.
>>
>> Therefore I tried the statement:
>>
>>      String repo = getRealm().getRepository().getNode("/polls").getPath();
>>
>> but it gives me only the path relative to the data repository.
>>
>> How can I get the whole path?
>>
>> I need it for the statement:
>>
>>          File xmlFile = org.wyona.commons.io.FileUtil.file(repo,
>> File.separator + uuid + File.separator + "participants.xml");
>>
>>
>> thanks a lot and greets,
>>
>> Bettina
>> -- 
>> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
>> Jetzt informieren: http://www.gmx.net/de/go/freephone
>> -- 
>> Yanel-usage mailing list Yanel-usage at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-usage



More information about the Yanel-usage mailing list