public static Status DestroyDB(String dbname, Options options) {
		Env env = options.env;
		List<String> filenames = new ArrayList<String>();
		// Ignore error in case directory does not exist
		try {
			filenames = env.GetChildren(dbname);
		} catch (Exception e) {
			filenames = new ArrayList<String>();
		}
		if (filenames.isEmpty()) {
			return Status.OK();
		}

		FileLock lock = null;
		String lockname = filename.LockFileName(dbname);
		lock = env.LockFile(lockname);

		Status s = Status.OK();

		if (lock != null) {
			long number;
			FileType type = new FileType();
			for (int i = 0; i < filenames.size(); i++) {
				try {
					number = filename.ParseFileName(filenames.get(i), type);
				} catch (Exception e) {
					// delete the file whatever it is
					number = 0;
				}
				if (number >= 0 && type.value != FileType.kDBLockFile) { // Lock
																			// file
																			// will
																			// be
																			// deleted
																			// at
																			// end
					s = env.DeleteFile(dbname + "/" + filenames.get(i));
				}
			}
			env.UnlockFile(lock); // Ignore error since state is already gone
			env.DeleteFile(dbname + "/LOCK");
			env.DeleteDir(dbname); // Ignore error in case dir contains other
									// files
		}
		return s;
	}