Custom files
Last updated on • Disponible en Français
Interview’s Custom files feature allows an interviewer to test a candidate’s ability to manipulate data, navigate a file system programmatically, and prove their expertise in a system very similar to what they’ll encounter on the job.
⚠️Note that this custom files feature is currently not available for use with multi-file frameworks like React or Angular. For these environments you can add the file directly to the file directory when you create the question.
After you have uploaded the files, you can attach them to questions. Typical use-cases for custom files are importing data from CSVs files for analysis, or analyzing log files in text format to aid in debugging exercises.
❗ Image file types (
.jpg
,.png
,If you wish to show images to a candidate, include it in the candidate instructions using Markdown instead.
Create custom file
To add a custom file for use in an interview question, first click Files in the left-side navigation bar of your dashboard.
Then click Create File to upload your file. Make sure to give your file a descriptive and recognizable name that you can refer to in the question.
You’ll then see a pop-up to upload your file. Drop it into the box, give it a title, and then click Upload File to add it to your file library.
⚠️Your file title should only contain letters, numbers, hypens, and/or underscores. Using other symbols may interfere with code execution in the pad.
Attach a custom file to a question
Custom Files must be associated with a question in your Question Library. Attach a custom file to a question in Step 2 – Add Code Elements of the question wizard. You can attach up to three files per question.
Accessing a file in an interview
During the interview, once a question with an attached file has been loaded, the candidate can access the file from the ./data/
directory. Here are some examples:
Python
f = open('./data/addresses.csv', 'r')
print('Filename:', f.name)
print(f.read())
Code language: Python (python)
JavaScript
const fs = require("fs");
const csv = fs.readFileSync("./data/test.csv")
console.log(csv.toString());
Code language: JavaScript (javascript)
Java
File file = new File("./data/test.csv");
Code language: Java (java)
Ruby
puts File.open('./data/test.csv')
Code language: Ruby (ruby)
☎️ Contact support if you have any problems accessing the files.