Files
gitbook/lib/json/encodeFile.js
T
2016-04-23 17:10:16 +02:00

17 lines
279 B
JavaScript

/**
Return a JSON representation of a file
@param {File} file
@return {Object}
*/
function encodeFileToJson(file) {
return {
path: file.getPath(),
mtime: file.getMTime(),
type: file.getType()
};
}
module.exports = encodeFileToJson;