public CMFolder getFolder ( CPath path ) { List < String > baseNames = path . split ( ) ; if ( path . isRoot ( ) ) { return this ; } CMFolder currentFolder = this ; CMFolder subFolder = null ; for ( String baseName : baseNames ) { subFolder = currentFolder . getChildByName ( baseName ) ; if ( subFolder == null ) { return null ; } currentFolder = subFolder ; } return subFolder ; }
Gets the CloudMe folder corresponding to a given CPath Returns null if the folder does not exist