output = new SimpleByteDataOutput(outputStream);
output.writeByte(DomainControllerProtocol.PARAM_NUM_FILES);
if (localPath == null || !localPath.exists()) {
output.writeInt(-1);
} else if (localPath.isFile()) {
output.writeInt(1);
writeFile(localPath, output);
} else {
final List<File> childFiles = getChildFiles(localPath);
output.writeInt(childFiles.size());
for (File child : childFiles) {