From 7dcebb88655dcbd87233cc812610cde731d817a6 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 30 Jul 2019 16:52:05 +0900 Subject: [PATCH] Added filename helper --- desktop/sources/scripts/library.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 9a60fa2..b2c891a 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -517,6 +517,10 @@ function Library (ronin) { return path } + this.filename = (path = this.filepath()) => { // Returns the name of a file. + return require('path').parse(path).name + } + this.exit = (force = false) => { // Exits Ronin. ronin.source.quit(force) }