/** * Unlockes SmartFile * * @param smart target SmartFile */ public static void unlock(SmartFile smart) { try { smart.getLocalFile().setWritable(true, true); } catch (NullPointerException e) { } catch (SecurityException e) { } catch (Exception e) { } }
/** Check whenever File is locked */ public static boolean isLocked(SmartFile file) { if (file == null) throw new IllegalArgumentException("file does not Exists"); return file.canLock() && file.isLocked(); }