448449450451452453454455456457458
if (fs == null) return false; if ((fs.capabilities() & (FSCapability.WRITE | FSCapability.STAT )) == 0) return false; try{ return fs.canWrite(filename); } catch (IOException ioe) { return false; } }