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,
  ]
}

Attribute

Type

Description

id

integer

Unique identifier for the object.

name

string

The name of the file.

code

string

The contents of the file. Accepts unicode-encoded strings, and will render newlines.

extension

string

The file extension. This field determines how the File's code will be syntax-highlighted.

submission

integer

The ID of the file's parent Submission.

comments

array of integers

The IDs of all comments applied to this file.

path

string

An optional file path, delimited by slashes, to indicate a directory structure within a submission.