static { try { File tmp = File.createTempFile("lock", null); try (FileStream fs = new FileStream(tmp.getPath(), cli.System.IO.FileMode.wrap(cli.System.IO.FileMode.Create))) { try { if (false) throw new cli.System.IO.IOException(); fs.Unlock(0, 1); } catch (cli.System.IO.IOException x) { msg = x.get_Message(); } } tmp.delete(); } catch (Throwable _) { } }
static boolean isErrorNotLocked(cli.System.IO.IOException x) { return x.get_Message().equals(msg); }