public static Inode wrap ( InodeView delegate ) { if ( delegate instanceof Inode ) { return ( Inode ) delegate ; } if ( delegate . isFile ( ) ) { Preconditions . checkState ( delegate instanceof InodeFileView ) ; return new InodeFile ( ( InodeFileView ) delegate ) ; } else { Preconditions . checkState ( delegate instanceof InodeDirectoryView ) ; return new InodeDirectory ( ( InodeDirectoryView ) delegate ) ; } }
Wraps an InodeView providing read - only access . Modifications to the underlying inode will affect the created read - only inode .