summaryrefslogtreecommitdiffstats
path: root/lib/json/encodeFile.js
blob: 03b34505c3e67fd501c0880860d6e9b9441a9ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

/**
    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;