• 2 replies
  • Latest Post - ‏2012-11-15T20:29:39Z by manuel220
9 Posts

Pinned topic SOMA to list the content of a directory?

‏2012-11-13T21:28:36Z |
Hi, Is there any way to get the content of a directory using the XML management interface? I'm having some troubles with SSH, so I would like to do it using a SOMA file or something like that, but I haven't been able to find how.
Updated on 2012-11-15T20:29:39Z at 2012-11-15T20:29:39Z by manuel220
  • HermannSW
    7448 Posts

    Re: SOMA to list the content of a directory?

    This SOMA request gives you information on directory "logstore:" in "default" domain:
    $ cat get-filestore.xml <env:Envelope xmlns:env=
    ""> <env:Body> <dp:request domain=
    "default" xmlns:dp=
    ""> <dp:get-filestore location=
    "logstore:"/> </dp:request> </env:Body> </env:Envelope> $

    You can use doSoma tool to easily manage SOMA requests.

    If you are interested in a subdirectory only, you need to filter the response by an XPath statement.

    See here what you can do to view the files in directory "logstore:/hda" only (with xpath++ tool):
    $ doSoma admin get-filestore.xml dp3-l3:5550 | xpath++ 
    "/*/*/*/*/location/directory[@name='logstore:/hda']" - Enter host password 
    for user 
    'admin':   ------------------------------------------------------------------------------- <directory xmlns:env=
    "" xmlns:dp=
    "" name=
    "logstore:/hda" read=
    "true" log=
    "true" show=
    "true" del=
    "true" list=
    "true"> <file name=
    "382e.log"> <size>3041808</size> <modified>2012-11-13 05:10:35</modified></file> <file name=
    "382e.log.1"> <size>5000159</size> <modified>2012-11-08 04:36:42</modified></file> <file name=
    "382e.log.2"> <size>5000187</size> <modified>2012-11-06 13:27:51</modified></file> <file name=
    "382e.log.3"> <size>5000091</size> <modified>2012-11-04 22:20:47</modified></file></directory> $

    Hermann<myXsltBlog/> <myXsltTweets/>
  • manuel220
    9 Posts

    Re: SOMA to list the content of a directory?

    That definitely works. Thank you very much!!