HTTP API_file - gd-99/symbiogd GitHub Wiki

The module file manages files.



Get a file's contents.

Permission required:

If the specified file is a directory, its content is returned as an object associating file paths to their metadata. Otherwise, the file's contents is returned via stdout (standard output).


  • 404: file not found.


Get a file's contents, encoded in base64.

See getContents for permissions, returned data and errors.


Get a file's contents, minified.

This action is deprecated. Do not use!


Get a file's metadata.

Permission required:

Returned data: the file's metadata.


  • 404: file not found.

Data models


  • path: the file path (e.g. ~/Desktop/myfile.txt)
  • basename: the file basename (e.g. myfile.txt)
  • realpath: the file direct path, relative to the current browser location (e.g. home/demo/Desktop/myfile.txt)
  • download_url: the file download URL
  • dirname: the file dirname (e.g. ~/Desktop)
  • Number atime: the file's last acces timestamp
  • Number mtime: the file's last modification timestamp
  • Number size: the file's size. If it's a directory, the number of contained files, otherwise the file's size in bytes.
  • Boolean is_dir: true if the file is a directory, false otherwise

If the file is not a directory:

  • mime_type: the file's MIME type
  • ...