boolean isValidToCreate ( String src ) { String srcs = normalizePath ( src ) ; byte [ ] [ ] components = INodeDirectory . getPathComponents ( srcs ) ; readLock ( ) ; try { if ( srcs . startsWith ( "/" ) && ! srcs . endsWith ( "/" ) && rootDir . getNode ( components ) == null ) { return true ; } else { return false ; } } finally { readUnlock ( ) ; } }
Check whether the filepath could be created