UNPKG

658 BJavaScriptView Raw
1// File
2// ====
3//
4// File object used for tracking files in `file-list.js`
5
6// Dependencies
7// ------------
8
9var _ = require('./helper')._
10
11// Constructor
12var File = function (path, mtime, doNotCache) {
13 // used for serving (processed path, eg some/file.coffee -> some/file.coffee.js)
14 this.path = path
15
16 // original absolute path, id of the file
17 this.originalPath = path
18
19 // where the content is stored (processed)
20 this.contentPath = path
21
22 this.mtime = mtime
23 this.isUrl = false
24
25 this.doNotCache = _.isUndefined(doNotCache) ? false : doNotCache
26}
27
28File.prototype.toString = function () {
29 return this.path
30}
31
32// PUBLIC
33module.exports = File