Takes a file and a pid and will stop the file with that PID from running, and remove the pid to app
mapping from the app pid mapper

@param ca

@param currentFile the application's file (can be file or directory)
335807
private void stopApplication(File currentFile) {
        if (_tc.isEventEnabled()) {
            Tr.event(_tc, "Stopping dropin application '" + currentFile.getName() + "'");
        }
        String filePath = getAppLocation(currentFile);

        try {
            Configuration config = _configs.remove(filePath);
            if (config != null) {
                config.delete();
            }
        } catch (Exception e) {
            getAppMessageHelper(null, filePath).error("MONITOR_APP_STOP_FAIL", currentFile.getName());
        }
    }
615733
public synchronized void releaseFile() {
        if (currentStatus == StreamStatus.ACTIVE) {
            // Only flush the print stream: don't close it.
            currentPrintStream.flush();

            if (!FileLogUtils.tryToClose(currentPrintStream)) {
                FileLogUtils.tryToClose(currentFileStream);
            }

            // Send to bit bucket again-- this holder is done (false -- do not replace)
            setStreamStatus(StreamStatus.INIT, null, null, DummyOutputStream.psInstance);
        }
    }
676731
void startFile(String src, PermissionStatus permissions,
                 String holder, String clientMachine,
                 boolean overwrite, boolean createParent, short replication, long blockSize
  ) throws IOException {
    INodeFileUnderConstruction file =
      startFileInternal(src, permissions, holder, clientMachine, overwrite, false,
      createParent, replication, blockSize);
    getEditLog().logSync(false);
    if (auditLog.isInfoEnabled()) {
      logAuditEvent(getCurrentUGI(),
        Server.getRemoteIp(),
        "create", src, null, file);
    }
  }
1360619
public void fileReused(File f) {
        if (!recentFiles.contains(f)) {
            throw new IllegalStateException("Selected a recent project that doesn't exist?");
        } else {
            recentFiles.remove(f);
            recentFiles.add(f);
        }
    }
663852
function isLicenseHeaderPresent(currentFile) {
		if (!isFileEmpty(currentFile.contents)) {
			var currentFileUtf8 = readCurrentFile(currentFile),
				licenseFileUtf8 = readLicenseHeaderFile(),
				skipStrict = 0;

			if(currentFileUtf8[0] === '"use strict";' ) {
				skipStrict = 1;
			}

			for (var i = skipStrict; i < licenseFileUtf8.length; i++) {
				if (currentFileUtf8[i + skipStrict] !== licenseFileUtf8[i]) {
					return false;
				}
			}
		}
		return true;
	}
178443
public static void deleteFileOrDirectory(File file) {
    if (!file.isDirectory()) {
      file.delete();
      return;
    }

    if (file.list().length == 0) { //Nothing under directory. Just delete it.
      file.delete();
      return;
    }

    for (String temp : file.list()) { //Delete files or directory under current directory.
      File fileDelete = new File(file, temp);
      deleteFileOrDirectory(fileDelete);
    }
    //Now there is nothing under directory, delete it.
    deleteFileOrDirectory(file);
  }
587451
protected void closeCurrentEntry() throws IOException {
		if (currentEntry != null) {
			if (currentEntry.getSize() > currentFileSize) {
				// Not fully read, skip rest of the bytes
				long bs = 0;
				while (bs < currentEntry.getSize() - currentFileSize) {
					long res = skip(currentEntry.getSize() - currentFileSize - bs);

					if (res == 0 && currentEntry.getSize() - currentFileSize > 0) {
						// I suspect file corruption
						throw new IOException("Possible tar file corruption");
					}

					bs += res;
				}
			}

			currentEntry = null;
			currentFileSize = 0L;
			skipPad();
		}
	}
426348
synchronized void unreserve(ChangedFile changedFile) {
        ChangedFile removedFile = this.reservedFiles.remove(getKey(changedFile));
        if (removedFile != null && !this.fileList.containsKey(getKey(removedFile))) {
            addChangedFile(removedFile);
        }
    }
179680
private void closeCurrent() throws IOException {
        virtualJarInputStream.closeEntry();
        currentEntry.crc = crc.getValue();
        crc.reset();
    }
225630
static void deleteCurrentSession(Context context) {
		SharedPreferences.Editor editor = getPrefs(context).edit();
		editor.remove(PREFS_KEY_EMAIL_RECIPIENTS);
		editor.remove(PREFS_KEY_FILTER_PID);
		editor.apply();
	}
1103404
public static void setCurrent(Graphics current) {
		if (currentGraphics != current) {
			if (currentGraphics != null) {
				currentGraphics.disable();
			}
			currentGraphics = current;
			currentGraphics.enable();
		}
	}
1163202
public void setCurrentuser(String currentUser) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(currentUser)) {
            m_currentuser = Boolean.valueOf(currentUser).booleanValue();
        }
    }
1207965
public static @CheckForNull FilePathFilter current() {
        Channel ch = Channel.current();
        if (ch==null)   return null;

        return ch.getProperty(FilePathFilterAggregator.KEY);
    }
737819
@Override
  public void deleteFileFromWithinApk(String file) throws ShellCommandException,
      AndroidSdkException {
    CommandLine line = new CommandLine(AndroidSdk.aapt());
    line.addArgument("remove", false);
    line.addArgument(apkFile.getAbsolutePath(), false);
    line.addArgument(file, false);

    ShellCommand.exec(line, 20000);
  }
516286
def delete(self, directory_updated=False):
        # pylint: disable=W0212
        
        with self.__lock:
            if self.__deleted:
                # Nothing to do
                return

            # Update status
            self.__deleted = True

            # Notify ConfigurationAdmin, notify services only if the
            # configuration had been updated before
            self.__config_admin._delete(self, self.__updated, directory_updated)

            # Remove the file
            self.__persistence.delete(self.__pid)

            # Clean up
            if self.__properties:
                self.__properties.clear()

            self.__persistence = None
            self.__pid = None
636183
private void deleteRecursive(final File file) {
        if (file.isDirectory()) {
            final String[] files = file.list();
            if (files != null) {
                for (String name : files) {
                    deleteRecursive(new File(file, name));
                }
            }
        }

        if (!file.delete()) {
            ControllerLogger.ROOT_LOGGER.cannotDeleteFileOrDirectory(file);
        }
    }
852648
function removePIDFile(name) {
  var pidFilePath = pidDir + name + '.pid';
  fs.exists(pidFilePath, function(exists) {
    if (exists) {
      fs.unlinkSync(pidFilePath);
    }
  });
}