public class File extends BespinController {
@RequiresLogin
public void list() throws IOException {
FileSystem filesys = getFilesystem();
java.io.File[] files = filesys.list(getUser(), getPath());
JSONArray array = new JSONArray();
for (int i = 0; i < files.length; i++) {
String name = files[i].getName();
if (files[i].isDirectory()) name += "/";
array.add(name);