SILENT KILLERPanel

Current Path: > home > transcarter > > > www > wp-content > > > > plugins > wp-file-manager > lib > js > > commands


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter///www/wp-content////plugins/wp-file-manager/lib/js//commands

NameTypeSizeLast ModifiedActions
archive.js File 2530 bytes June 30 2025 14:02:54.
back.js File 512 bytes June 30 2025 14:02:54.
chmod.js File 9591 bytes June 30 2025 14:02:54.
colwidth.js File 480 bytes June 30 2025 14:02:54.
copy.js File 986 bytes June 30 2025 14:02:54.
cut.js File 1146 bytes June 30 2025 14:02:54.
download.js File 17005 bytes June 30 2025 14:02:54.
duplicate.js File 1392 bytes June 30 2025 14:02:54.
edit.js File 35310 bytes June 30 2025 14:02:54.
empty.js File 3395 bytes June 30 2025 14:02:54.
extract.js File 5301 bytes June 30 2025 14:02:54.
forward.js File 509 bytes June 30 2025 14:02:54.
fullscreen.js File 1074 bytes June 30 2025 14:02:54.
getfile.js File 4163 bytes June 30 2025 14:02:54.
help.js File 14547 bytes June 30 2025 14:02:54.
hidden.js File 276 bytes June 30 2025 14:02:54.
hide.js File 4365 bytes June 30 2025 14:02:54.
home.js File 528 bytes June 30 2025 14:02:54.
info.js File 13447 bytes June 30 2025 14:02:54.
mkdir.js File 2574 bytes June 30 2025 14:02:54.
mkfile.js File 1675 bytes June 30 2025 14:02:54.
netmount.js File 10681 bytes June 30 2025 14:02:54.
open.js File 6947 bytes June 30 2025 14:02:54.
opendir.js File 886 bytes June 30 2025 14:02:54.
opennew.js File 1242 bytes June 30 2025 14:02:54.
paste.js File 10411 bytes June 30 2025 14:02:54.
places.js File 773 bytes June 30 2025 14:02:54.
preference.js File 21880 bytes June 30 2025 14:02:54.
quicklook.js File 24445 bytes June 30 2025 14:02:54.
quicklook.plugins.js File 59912 bytes June 30 2025 14:02:54.
reload.js File 1904 bytes June 30 2025 14:02:54.
rename.js File 16299 bytes June 30 2025 14:02:54.
resize.js File 53421 bytes June 30 2025 14:02:54.
restore.js File 7625 bytes June 30 2025 14:02:54.
rm.js File 14762 bytes June 30 2025 14:02:54.
search.js File 4110 bytes June 30 2025 14:02:54.
selectall.js File 606 bytes June 30 2025 14:02:54.
selectinvert.js File 471 bytes June 30 2025 14:02:54.
selectnone.js File 530 bytes June 30 2025 14:02:54.
sort.js File 4421 bytes June 30 2025 14:02:54.
undo.js File 3703 bytes June 30 2025 14:02:54.
up.js File 710 bytes June 30 2025 14:02:54.
upload.js File 12696 bytes June 30 2025 14:02:54.
view.js File 2868 bytes June 30 2025 14:02:54.

Reading File: /home/transcarter///www/wp-content////plugins/wp-file-manager/lib/js//commands/empty.js

/**
 * @class elFinder command "empty".
 * Empty the folder
 *
 * @type  elFinder.command
 * @author  Naoki Sawada
 */
 elFinder.prototype.commands.empty = function() {
	"use strict";
	var self, fm,
		selFiles = function(select) {
			var sel = self.files(select);
			if (!sel.length) {
				sel = [ fm.cwd() ];
			}
			return sel;
		};
	
	this.linkedCmds = ['rm'];
	
	this.init = function() {
		// lazy assign to make possible to become superclass
		self = this;
		fm = this.fm;
	};

	this.getstate = function(select) {
		var sel = selFiles(select),
			cnt,
			filter = function(files) {
				var fres = true;
				return jQuery.grep(files, function(f) {
					fres = fres && f.read && f.write && f.mime === 'directory' ? true : false;
					return fres;
				});
			};
		
		cnt = sel.length;
		return filter(sel).length == cnt ? 0 : -1;
	};
	
	this.exec = function(hashes) {
		var dirs = selFiles(hashes),
			cnt  = dirs.length,
			dfrd = jQuery.Deferred()
				.done(function() {
					var data = {changed: {}};
					fm.toast({msg: fm.i18n(['"'+success.join('", ')+'"', 'complete', fm.i18n('cmdempty')])});
					jQuery.each(dirs, function(i, dir) {
						data.changed[dir.hash] = dir;
					});
					fm.change(data);
				})
				.always(function() {
					var cwd = fm.cwd().hash;
					fm.trigger('selectfiles', {files: jQuery.map(dirs, function(d) { return cwd === d.phash? d.hash : null; })});
				}),
			success = [],
			done = function(res) {
				if (typeof res === 'number') {
					success.push(dirs[res].name);
					delete dirs[res].dirs;
				} else {
					res && fm.error(res);
				}
				(--cnt < 1) && dfrd[success.length? 'resolve' : 'reject']();
			};

		jQuery.each(dirs, function(i, dir) {
			var tm;
			if (!(dir.write && dir.mime === 'directory')) {
				done(['errEmpty', dir.name, 'errPerm']);
				return null;
			}
			if (!fm.isCommandEnabled('rm', dir.hash)) {
				done(['errCmdNoSupport', '"rm"']);
				return null;
			}
			tm = setTimeout(function() {
				fm.notify({type : 'search', cnt : 1, hideCnt : cnt > 1? false : true});
			}, fm.notifyDelay);
			fm.request({
				data : {cmd  : 'open', target : dir.hash},
				preventDefault : true,
				asNotOpen : true
			}).done(function(data) {
				var targets = [];
				tm && clearTimeout(tm);
				if (fm.ui.notify.children('.elfinder-notify-search').length) {
					fm.notify({type : 'search', cnt : -1, hideCnt : cnt > 1? false : true});
				}
				if (data && data.files && data.files.length) {
					if (data.files.length > fm.maxTargets) {
						done(['errEmpty', dir.name, 'errMaxTargets', fm.maxTargets]);
					} else {
						fm.updateCache(data);
						jQuery.each(data.files, function(i, f) {
							if (!f.write || f.locked) {
								done(['errEmpty', dir.name, 'errRm', f.name, 'errPerm']);
								targets = [];
								return false;
							}
							targets.push(f.hash);
						});
						if (targets.length) {
							fm.exec('rm', targets, { _userAction : true, addTexts : [ fm.i18n('folderToEmpty', dir.name) ] })
							.fail(function(error) {
								fm.trigger('unselectfiles', {files: fm.selected()});
								done(fm.parseError(error) || '');
							})
							.done(function() { done(i); });
						}
					}
				} else {
					fm.toast({ mode: 'warning', msg: fm.i18n('filderIsEmpty', dir.name)});
					done('');
				}
			}).fail(function(error) {
				done(fm.parseError(error) || '');
			});
		});
		
		return dfrd;
	};

};

SILENT KILLER Tool