}
public File copyFile ( File file, Host host, Folder parent, User user, boolean respectFrontendRoles ) throws IOException, DotSecurityException, DotDataException {
if ( !isLegacyFilesSupported() ) {
throw new DotStateException( "File Assets have been disabled." );
}
if ( !permissionAPI.doesUserHavePermission( file, PermissionAPI.PERMISSION_READ, user, respectFrontendRoles ) ) {
throw new DotSecurityException( WebKeys.USER_PERMISSIONS_EXCEPTION );
} else if ( parent != null && !permissionAPI.doesUserHavePermission( parent, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontendRoles ) ) {