summaryrefslogtreecommitdiffstats
path: root/lib/models/file.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/file.js')
-rw-r--r--lib/models/file.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/models/file.js b/lib/models/file.js
index ff7b899..d1726a7 100644
--- a/lib/models/file.js
+++ b/lib/models/file.js
@@ -74,5 +74,16 @@ File.createFromStat = function createFromStat(filepath, stat) {
});
};
+/**
+ Create a file with only a path
+
+ @param {String} filepath
+ @return {File}
+*/
+File.createWithFilepath = function createWithFilepath(filepath) {
+ return new File({
+ path: filepath
+ });
+};
module.exports = File;