Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Engines/Wine/Shortcuts/Reader/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var _WineShortcutReader = function(shortcut) {
}
};

/* exported ShortcutReader */
var ShortcutReader = function() {
var that = this;

Expand Down
1 change: 1 addition & 0 deletions Engines/Wine/Shortcuts/Wine/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include(["Engines", "Wine", "Engine", "Object"]);

/* exported WineShortcut */
var WineShortcut = function () {
var that = this;
that._shortcutManager = Bean("shortcutManager");
Expand Down
1 change: 1 addition & 0 deletions Utils/Functions/Apps/Resources/script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* exported AppResource */
var AppResource = function() {
var that = this;
that._appsManager = Bean("repositoryManager");
Expand Down
4 changes: 3 additions & 1 deletion Utils/Functions/Filesystem/Extract/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include(["Utils", "Functions", "Filesystem", "Files"]);

/* exported CabExtract */
var CabExtract = function() {
var that = this;

Expand Down Expand Up @@ -49,6 +50,7 @@ var CabExtract = function() {

};

/* exported Extractor */
var Extractor = function () {
var that = this;
that._extractor = Bean("extractor");
Expand Down Expand Up @@ -80,4 +82,4 @@ var Extractor = function () {
progressBar.accept(progress);
});
}
};
};
12 changes: 12 additions & 0 deletions Utils/Functions/Filesystem/Files/script.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,65 @@
var fileAnalyser = Bean("fileAnalyser");
var fileUtilities = Bean("fileUtilities");

/* exported mkdir */
var mkdir = function (directoryPath) {
fileUtilities.mkdir(new java.io.File(directoryPath))
};

/* exported fileExists */
var fileExists = function (filePath) {
return new java.io.File(filePath).exists();
};

/* exported cat */
var cat = function(filePath) {
return Bean("fileUtilities").getFileContent(new java.io.File(filePath));
};

/* exported cp */
var cp = function(source, target) {
return Bean("fileUtilities").copy(new java.io.File(source), new java.io.File(target));
};

/* exported getFileSize */
var getFileSize = function(filePath) {
return Bean("fileUtilities").getSize(new java.io.File(filePath));
};

/* exported fileName */
var fileName = function(filePath) {
return new java.io.File(filePath).getName();
};

/* exported lns */
var lns = function(target, destination) {
return Bean("fileUtilities").createSymbolicLink(new java.io.File(destination), new java.io.File(target));
};

/* exported remove */
var remove = function(filePath) {
return Bean("fileUtilities").remove(new java.io.File(filePath));
};

/* exported touch */
var touch = function(filePath) {
if (!fileExists(filePath)) {
Bean("fileUtilities").writeToFile(new java.io.File(filePath), "");
}
};

/* exported writeToFile */
var writeToFile = function(filePath, content) {
Bean("fileUtilities").writeToFile(new java.io.File(filePath), content);
};

/* exported createTempFile */
var createTempFile = function (extension) {
var tmpFile = Bean("fileUtilities").createTmpFile(extension);
return tmpFile.getAbsolutePath();
};

/* exported Checksum */
var Checksum = function () {
var that = this;
that._method = "SHA";
Expand Down
1 change: 1 addition & 0 deletions Utils/Functions/Net/Download/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include(["Utils", "Functions", "Filesystem", "Files"]);

/* exported Downloader */
var Downloader = function () {
var that = this;
that._downloader = Bean("downloader");
Expand Down
1 change: 1 addition & 0 deletions Utils/Functions/Net/Resource/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include(["Utils", "Functions", "Net", "Download"]);
include(["Utils", "Functions", "Filesystem", "Files"]);

/* exported Resource */
var Resource = function () {
var that = this;
this._algorithm = "SHA";
Expand Down