1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/** Return a JSON representation of a file @param {File} file @return {Object} */ function encodeFileToJson(file) { var filePath = file.getPath(); if (!filePath) { return undefined; } return { path: filePath, mtime: file.getMTime(), type: file.getType() }; } module.exports = encodeFileToJson;