Robot Web Services
3HAC050973-001 Revision:L, Application Manual - Robot Web Services
Get Directory listing of resources

List contents of a directory resource.

Environment variables and devices are also treated as directories.

URL

/fileservice/{environment_variable|device}/{directory}

Method

GET

URL Params

See Common URL parameters

Data Params

None

Success Response

HTTP_OK(200)

Example Response

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>File Service</title> 
    <base href="http://localhost/fileservice/%7ehome/" />     
  </head>
  <body>

    <div class="state">    
      <a href="" rel="self"></a> 
      <a href="../" rel="parent"></a>
      <ul>        
        <li class="fs-dir" title="home">
            <a href="?action=show" rel="action"></a>   
        </li>
        <li class="fs-file" title="access_log.txt">
          <a href="" rel="parent"></a>
          <a href="access_log.txt" rel="self"></a>
          <span class="fs-cdate">2013-03-18 T 16:24:14</span>
          <span class="fs-mdate">2013-03-18 T 18:25:00</span>
          <span class="fs-size">18696</span>
          <span class="fs-readonly">false</span>
            <a href="access_log.txt?action=show" rel="action"></a>    
        </li>
        <li class="fs-dir" title="docs">
          <a href="" rel="parent"></a>
          <a href="docs" rel="self"></a>
          <span class="fs-cdate">2013-03-19 T 13:44:34</span>
          <span class="fs-mdate">2013-03-19 T 16:44:34</span>
            <a href="docs?action=show" rel="action"></a>    
        </li>
        <li class="fs-file" title="error_log.txt">
          <a href="" rel="parent"></a>
          <a href="error_log.txt" rel="self"></a>
          <span class="fs-cdate">2013-03-18 T 16:24:14</span>
          <span class="fs-mdate">2013-03-18 T 18:24:14</span>
          <span class="fs-size">19426</span>
          <span class="fs-readonly">false</span>
            <a href="error_log.txt?action=show" rel="action"></a>    
        </li>
        <li class="fs-file" title="linked_m.sys">
          <a href="" rel="parent"></a>
          <a href="linked_m.sys" rel="self"></a>
          <span class="fs-cdate">2013-03-18 T 16:24:10</span>
          <span class="fs-mdate">2013-03-18 T 20:24:14</span>
          <span class="fs-size">2391</span>
          <span class="fs-readonly">false</span>
            <a href="linked_m.sys?action=show" rel="action"></a>    
        </li>
        <li class="fs-file" title="user.sys">
          <a href="" rel="parent"></a>
          <a href="user.sys" rel="self"></a>
          <span class="fs-cdate">2013-03-18 T 16:24:11</span>
          <span class="fs-mdate">2013-03-18 T 21:24:14</span>
          <span class="fs-size">458</span>
          <span class="fs-readonly">false</span>
            <a href="user.sys?action=show" rel="action"></a>    
        </li>
      </ul>
    </div>
  </body>
</html>

Resources

  • fs-dir
    • fs-cdate The creation date of the resource in YYYY-MM-DD T HH:MM:SS format
    • fs-mdate The time of last modification of the resource in YYYY-MM-DD T HH:MM:SS format
  • fs-file
    • fs-cdate The creation date of the resource in YYYY-MM-DD T HH:MM:SS format
    • fs-mdate The time of last modification of the resource in YYYY-MM-DD T HH:MM:SS format
    • fs-size The size of file on the media in bytes.
    • fs-readonly A boolean specifying if a file is read only or not. Possible values are: true and false

Error Response

UNAUTHORIZED(401), NOT_FOUND(404), BAD_REQUEST(400) See Robot controller return codes

Sample Call

Directory Listing

curl --digest -u "Default User":robotics "http://localhost/fileservice/$home"

Notes

Supported in bootserver mode