The File Object

{
  "id": 1,
  "name": "hello.java",
  "code": "System.out.println('hello, world');",
  "extension": "java",
  "submission": 1,
  "comments": [ // comments have been added to this File
    1,
    2,
  ]
}
AttributeTypeDescription
idintegerUnique identifier for the object.
namestringThe name of the file.
codestringThe contents of the file. Accepts unicode-encoded strings, and will render newlines.
extensionstringThe file extension. This field determines how the File's code will be syntax-highlighted.
submissionintegerThe ID of the file's parent Submission.
commentsarray of integersThe IDs of all comments applied to this file.
pathstringAn optional file path, delimited by slashes, to indicate a directory structure within a submission.