public void moveTo ( FatLfnDirectory target , String newName ) throws IOException , ReadOnlyException { checkWritable ( ) ; if ( ! target . isFreeName ( newName ) ) { throw new IOException ( "the name \"" + newName + "\" is already in use" ) ; } this . parent . unlinkEntry ( this ) ; this . parent = target ; this . fileName = newName ; this . parent . linkEntry ( this ) ; }
Moves this entry to a new directory under the specified name .